.text:004018A0 Portraits_something proc near ; CODE XREF: sub_401950+33Ap.text:004018A0 ; sub_401950+4D1p.text:004018A0.text:004018A0 arg_0 = dword ptr 8.text:004018A0.text:004018A0 push esi.text:004018A1 mov esi, [esp+arg_0].text:004018A5 cmp dword ptr [esi], 0.text:004018A8 jnz short loc_40191C.text:004018AA mov dword_5014D8, 1.text:004018B4 mov dword_5014DC, 25h.text:004018BE mov dword_5014E0, 135h.text:004018C8 mov eax, bkgnd_id.text:004018CD mov dword_5014FC, 0 ; counter.text:004018D7 lea ecx, bkgnd_table[eax*8] ; MB_xx // background table.text:004018DE mov eax, offset unk_4CFBD0 ; first portrait.text:004018E3 mov bkgnd_entry, ecx.text:004018E9.text:004018E9 loop: ; CODE XREF: Portraits_something+74j.text:004018E9 mov ecx, [eax] ; sprite_slot.ref_count.text:004018EB test ecx, ecx.text:004018ED jz short loc_40190C.text:004018EF mov ecx, [eax+28h] ; sprite_slot.loaded_index.text:004018F2 mov edx, dword_5014FC.text:004018F8 mov dword_501500[edx*8], ecx ; Loaded_Portrait_Array?.text:004018FF mov edx, dword_5014FC.text:00401905 inc edx.text:00401906 mov dword_5014FC, edx.text:0040190C.text:0040190C loc_40190C: ; CODE XREF: Portraits_something+4Dj.text:0040190C add eax, 2Ch.text:0040190F cmp eax, offset unk_4D09E8 ; last portrait.text:00401914 jb short loop.text:00401916 mov dword ptr [esi], offset dword_5014D8.text:0040191C.text:0040191C loc_40191C: ; CODE XREF: Portraits_something+8j.text:0040191C pop esi.text:0040191D retn.text:0040191D Portraits_something endp