Function at 0x497230
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x240
push ebx
push ebp
push esi
mov esi, dword [esp + 0x254]
push edi
push 0x5c
mov ebp, ecx
push esi
call fcn.004a8857
add esp, 8
test eax, eax
je 0x49726f
push esi
call dword [0x4d6360]
cmp eax, 0xffffffff
je 0x49726f
lea eax, [esp + 0x14c]
push esi
push eax
call dword [0x4d633c]
jmp 0x497285
push esi
lea ecx, [esp + 0x150]
push 0x4f6278
push ecx
call fcn.00471100
add esp, 0xc
lea edx, [esp + 0x40]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x150]
xor ebx, ebx
push eax
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x28], ebx
call fcn.00470f00
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
mov esi, dword [0x4d6824]
mov dword [esp + 0x30], eax
mov al, byte [esp + 0x260]
add esp, 0xc
test al, 1
mov dword [esp + 0x20], edx
je 0x497479
push 0x180
call fcn.004bd49b
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x497355
lea edx, [edi + 0x114]
xor ecx, ecx
mov dword [edi], 0x4db0d0
mov byte [edi + 4], bl
mov dword [edi + 0x108], ebx
mov word [edi + 0x10c], 0x8000
mov word [edi + 0x10e], 2
mov dword [edi + 0x110], ebx
mov dword [edi + 0x11c], ebx
mov dword [edx], ecx
lea eax, [edi + 0x120]
push eax
mov dword [edx + 4], ecx
call dword [0x4d6474]
mov ecx, edi
mov dword [edi], 0x4db0f8
mov dword [edi + 0x138], ebx
call fcn.0048c550
mov dword [esp + 0x10], edi
jmp 0x49735b
xor edi, edi
mov dword [esp + 0x10], edi
lea ecx, [esp + 0x14c]
lea eax, [edi + 4]
push ecx
push eax
mov dword [esp + 0x3c], edi
call dword [0x4d633c]
mov edx, dword [esp + 0x20]
mov dword [edi + 0x110], edx
mov eax, dword [esp + 0x14]
mov edx, dword [edi]
mov dword [edi + 0x114], eax
mov ecx, dword [esp + 0x18]
mov dword [edi + 0x118], ecx
mov eax, dword [ebp + 0xc8]
push eax
mov ecx, edi
call dword [edx + 0x18]
test eax, eax
jne 0x497479
mov eax, dword [ebp + 0x13c]
cmp eax, ebx
je 0x49745b
push 5
push eax
call dword [0x4d6828]
mov ecx, dword [esp + 0x10]
lea eax, [ecx + 4]
push eax
call fcn.00471a00
mov edx, dword [ebp + 0x13c]
add esp, 4
push eax
push 0x43d
push edx
call esi
mov al, byte [0x4f55a8]
mov ecx, 0x40
mov byte [esp + 0x48], al
xor eax, eax
lea edi, [esp + 0x49]
mov edx, dword [esp + 0x10]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [esp + 0x48]
lea edi, [edx + 4]
push ecx
push edi
call fcn.00471240
mov ecx, dword [ebp + 0x13c]
add esp, 8
lea eax, [esp + 0x48]
push eax
push 0x43c
push ecx
call esi
push 1
push ebx
push edi
call fcn.004736f0
mov edx, dword [ebp + 0x13c]
add esp, 0xc
mov edi, eax
push ebx
push edi
push 0x170
push 0x3f0
push edx
call dword [0x4d6814]
mov eax, dword [ebp + 0x13c]
push eax
call dword [0x4d67a4]
push edi
call dword [0x4d6798]
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
cmp eax, ebx
je 0x49746b
cmp eax, 2
jne 0x497479
mov ecx, dword [ebp + 0xc8]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x14]
test byte [esp + 0x254], 0x10
je 0x497620
push 0x14c
call fcn.004bd49b
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x4974fb
lea eax, [edi + 0x114]
xor edx, edx
mov dword [edi], 0x4db0d0
mov byte [edi + 4], 0
mov dword [edi + 0x108], ebx
mov word [edi + 0x10c], 0x8000
mov word [edi + 0x10e], 2
mov dword [edi + 0x110], ebx
mov dword [edi + 0x11c], ebx
mov dword [eax], edx
lea ecx, [edi + 0x120]
push ecx
mov dword [eax + 4], edx
call dword [0x4d6474]
mov ecx, edi
mov dword [edi], 0x4db120
mov dword [edi + 0x138], ebx
call fcn.0048e480
mov dword [esp + 0x10], edi
jmp 0x497501
xor edi, edi
mov dword [esp + 0x10], edi
lea edx, [esp + 0x14c]
lea eax, [edi + 4]
push edx
push eax
mov dword [esp + 0x38], edi
call dword [0x4d633c]
mov eax, dword [esp + 0x20]
mov dword [edi + 0x110], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov dword [edi + 0x114], ecx
mov edx, dword [esp + 0x18]
mov dword [edi + 0x118], edx
mov ecx, dword [ebp + 0xcc]
push ecx
mov ecx, edi
call dword [eax + 0x18]
test eax, eax
jne 0x497620
mov eax, dword [ebp + 0x13c]
cmp eax, ebx
je 0x497602
push 5
push eax
call dword [0x4d6828]
mov edx, dword [esp + 0x10]
lea eax, [edx + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
mov eax, dword [ebp + 0x13c]
push 0x43d
push eax
call esi
mov cl, byte [0x4f55a8]
xor eax, eax
mov byte [esp + 0x48], cl
mov ecx, 0x40
lea edi, [esp + 0x49]
lea edx, [esp + 0x48]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
push edx
lea edi, [eax + 4]
push edi
call fcn.00471240
mov edx, dword [ebp + 0x13c]
add esp, 8
lea ecx, [esp + 0x48]
push ecx
push 0x43c
push edx
call esi
push 1
push ebx
push edi
call fcn.004736f0
add esp, 0xc
mov edi, eax
mov eax, dword [ebp + 0x13c]
push ebx
push edi
push 0x170
push 0x3f0
push eax
call dword [0x4d6814]
mov ecx, dword [ebp + 0x13c]
push ecx
call dword [0x4d67a4]
push edi
call dword [0x4d6798]
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
cmp eax, ebx
je 0x497612
cmp eax, 2
jne 0x497620
mov ecx, dword [ebp + 0xcc]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x14]
test byte [esp + 0x254], 2
je 0x4977c7
push 0x180
call fcn.004bd49b
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x4976a2
lea eax, [edi + 0x114]
xor edx, edx
mov dword [edi], 0x4db0d0
mov byte [edi + 4], 0
mov dword [edi + 0x108], ebx
mov word [edi + 0x10c], 0x8000
mov word [edi + 0x10e], 2
mov dword [edi + 0x110], ebx
mov dword [edi + 0x11c], ebx
mov dword [eax], edx
lea ecx, [edi + 0x120]
push ecx
mov dword [eax + 4], edx
call dword [0x4d6474]
mov ecx, edi
mov dword [edi], 0x4db148
mov dword [edi + 0x138], ebx
call fcn.0048c550
mov dword [esp + 0x10], edi
jmp 0x4976a8
xor edi, edi
mov dword [esp + 0x10], edi
lea edx, [esp + 0x14c]
lea eax, [edi + 4]
push edx
push eax
mov dword [esp + 0x40], edi
call dword [0x4d633c]
mov eax, dword [esp + 0x20]
mov dword [edi + 0x110], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov dword [edi + 0x114], ecx
mov edx, dword [esp + 0x18]
mov dword [edi + 0x118], edx
mov ecx, dword [ebp + 0xd0]
push ecx
mov ecx, edi
call dword [eax + 0x18]
test eax, eax
jne 0x4977c7
mov eax, dword [ebp + 0x13c]
cmp eax, ebx
je 0x4977a9
push 5
push eax
call dword [0x4d6828]
mov edx, dword [esp + 0x10]
lea eax, [edx + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
mov eax, dword [ebp + 0x13c]
push 0x43d
push eax
call esi
mov cl, byte [0x4f55a8]
xor eax, eax
mov byte [esp + 0x48], cl
mov ecx, 0x40
lea edi, [esp + 0x49]
lea edx, [esp + 0x48]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
push edx
lea edi, [eax + 4]
push edi
call fcn.00471240
mov edx, dword [ebp + 0x13c]
add esp, 8
lea ecx, [esp + 0x48]
push ecx
push 0x43c
push edx
call esi
push 1
push ebx
push edi
call fcn.004736f0
add esp, 0xc
mov edi, eax
mov eax, dword [ebp + 0x13c]
push ebx
push edi
push 0x170
push 0x3f0
push eax
call dword [0x4d6814]
mov ecx, dword [ebp + 0x13c]
push ecx
call dword [0x4d67a4]
push edi
call dword [0x4d6798]
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
cmp eax, ebx
je 0x4977b9
cmp eax, 2
jne 0x4977c7
mov ecx, dword [ebp + 0xd0]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x14]
test byte [esp + 0x254], 4
je 0x49796e
push 0x178
call fcn.004bd49b
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x497849
lea eax, [edi + 0x114]
xor edx, edx
mov dword [edi], 0x4db0d0
mov byte [edi + 4], 0
mov dword [edi + 0x108], ebx
mov word [edi + 0x10c], 0x8000
mov word [edi + 0x10e], 2
mov dword [edi + 0x110], ebx
mov dword [edi + 0x11c], ebx
mov dword [eax], edx
lea ecx, [edi + 0x120]
push ecx
mov dword [eax + 4], edx
call dword [0x4d6474]
mov ecx, edi
mov dword [edi], 0x4db170
mov dword [edi + 0x138], ebx
call fcn.00491970
mov dword [esp + 0x10], edi
jmp 0x49784f
xor edi, edi
mov dword [esp + 0x10], edi
lea edx, [esp + 0x14c]
lea eax, [edi + 4]
push edx
push eax
mov dword [esp + 0x30], edi
call dword [0x4d633c]
mov eax, dword [esp + 0x20]
mov dword [edi + 0x110], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov dword [edi + 0x114], ecx
mov edx, dword [esp + 0x18]
mov dword [edi + 0x118], edx
mov ecx, dword [ebp + 0xd4]
push ecx
mov ecx, edi
call dword [eax + 0x18]
test eax, eax
jne 0x49796e
mov eax, dword [ebp + 0x13c]
cmp eax, ebx
je 0x497950
push 5
push eax
call dword [0x4d6828]
mov edx, dword [esp + 0x10]
lea eax, [edx + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
mov eax, dword [ebp + 0x13c]
push 0x43d
push eax
call esi
mov cl, byte [0x4f55a8]
xor eax, eax
mov byte [esp + 0x48], cl
mov ecx, 0x40
lea edi, [esp + 0x49]
lea edx, [esp + 0x48]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
push edx
lea edi, [eax + 4]
push edi
call fcn.00471240
mov edx, dword [ebp + 0x13c]
add esp, 8
lea ecx, [esp + 0x48]
push ecx
push 0x43c
push edx
call esi
push 1
push ebx
push edi
call fcn.004736f0
add esp, 0xc
mov edi, eax
mov eax, dword [ebp + 0x13c]
push ebx
push edi
push 0x170
push 0x3f0
push eax
call dword [0x4d6814]
mov ecx, dword [ebp + 0x13c]
push ecx
call dword [0x4d67a4]
push edi
call dword [0x4d6798]
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
cmp eax, ebx
je 0x497960
cmp eax, 2
jne 0x49796e
mov ecx, dword [ebp + 0xd4]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x14]
test byte [esp + 0x254], 8
je 0x497b15
push 0x168
call fcn.004bd49b
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x4979f0
lea eax, [edi + 0x114]
xor edx, edx
mov dword [edi], 0x4db0d0
mov byte [edi + 4], 0
mov dword [edi + 0x108], ebx
mov word [edi + 0x10c], 0x8000
mov word [edi + 0x10e], 2
mov dword [edi + 0x110], ebx
mov dword [edi + 0x11c], ebx
mov dword [eax], edx
lea ecx, [edi + 0x120]
push ecx
mov dword [eax + 4], edx
call dword [0x4d6474]
mov ecx, edi
mov dword [edi], 0x4db198
mov dword [edi + 0x138], ebx
call fcn.00493fe0
mov dword [esp + 0x10], edi
jmp 0x4979f6
xor edi, edi
mov dword [esp + 0x10], edi
lea edx, [esp + 0x14c]
lea eax, [edi + 4]
push edx
push eax
mov dword [esp + 0x44], edi
call dword [0x4d633c]
mov eax, dword [esp + 0x20]
mov dword [edi + 0x110], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov dword [edi + 0x114], ecx
mov edx, dword [esp + 0x18]
mov dword [edi + 0x118], edx
mov ecx, dword [ebp + 0xd8]
push ecx
mov ecx, edi
call dword [eax + 0x18]
test eax, eax
jne 0x497b15
mov eax, dword [ebp + 0x13c]
cmp eax, ebx
je 0x497af7
push 5
push eax
call dword [0x4d6828]
mov edx, dword [esp + 0x10]
lea eax, [edx + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
mov eax, dword [ebp + 0x13c]
push 0x43d
push eax
call esi
mov cl, byte [0x4f55a8]
xor eax, eax
mov byte [esp + 0x48], cl
mov ecx, 0x40
lea edi, [esp + 0x49]
lea edx, [esp + 0x48]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
push edx
lea edi, [eax + 4]
push edi
call fcn.00471240
mov edx, dword [ebp + 0x13c]
add esp, 8
lea ecx, [esp + 0x48]
push ecx
push 0x43c
push edx
call esi
push 1
push ebx
push edi
call fcn.004736f0
add esp, 0xc
mov edi, eax
mov eax, dword [ebp + 0x13c]
push ebx
push edi
push 0x170
push 0x3f0
push eax
call dword [0x4d6814]
mov ecx, dword [ebp + 0x13c]
push ecx
call dword [0x4d67a4]
push edi
call dword [0x4d6798]
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
cmp eax, ebx
je 0x497b07
cmp eax, 2
jne 0x497b15
mov ecx, dword [ebp + 0xd8]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x14]
test byte [esp + 0x254], 0x20
je 0x497cb2
push 0x14c
call fcn.004bd49b
mov edi, eax
xor ebx, ebx
add esp, 4
cmp edi, ebx
je 0x497b98
lea eax, [edi + 0x114]
xor edx, edx
mov dword [edi], 0x4db0d0
mov byte [edi + 4], bl
mov dword [edi + 0x108], ebx
mov word [edi + 0x10c], 0x8000
mov word [edi + 0x10e], 2
mov dword [edi + 0x110], ebx
mov dword [edi + 0x11c], ebx
mov dword [eax], edx
lea ecx, [edi + 0x120]
push ecx
mov dword [eax + 4], edx
call dword [0x4d6474]
mov ecx, edi
mov dword [edi], 0x4db1c0
mov dword [edi + 0x138], ebx
call fcn.0048e480
mov dword [esp + 0x10], edi
jmp 0x497b9c
mov dword [esp + 0x10], ebx
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x14c]
push edx
mov dword [esp + 0x20], edi
lea ebx, [edi + 4]
push ebx
call dword [0x4d633c]
mov eax, dword [esp + 0x20]
mov dword [edi + 0x110], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
mov dword [edi + 0x114], ecx
mov edx, dword [esp + 0x18]
mov dword [edi + 0x118], edx
mov ecx, dword [ebp + 0xdc]
push ecx
mov ecx, edi
call dword [eax + 0x18]
test eax, eax
jne 0x497cb2
mov eax, dword [ebp + 0x13c]
test eax, eax
je 0x497c94
push 5
push eax
call dword [0x4d6828]
push ebx
call fcn.00471a00
mov edx, dword [ebp + 0x13c]
add esp, 4
push eax
push 0x43d
push edx
call esi
mov al, byte [0x4f55a8]
mov ecx, 0x40
mov byte [esp + 0x48], al
xor eax, eax
lea edi, [esp + 0x49]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x48]
push ecx
push ebx
stosb byte es:[edi], al
call fcn.00471240
mov eax, dword [ebp + 0x13c]
add esp, 8
lea edx, [esp + 0x48]
push edx
push 0x43c
push eax
call esi
push 1
push 0
push ebx
call fcn.004736f0
mov ecx, dword [ebp + 0x13c]
add esp, 0xc
mov esi, eax
push 0
push esi
push 0x170
push 0x3f0
push ecx
call dword [0x4d6814]
mov edx, dword [ebp + 0x13c]
push edx
call dword [0x4d67a4]
push esi
call dword [0x4d6798]
mov edi, dword [esp + 0x10]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
test eax, eax
je 0x497ca4
cmp eax, 2
jne 0x497cb2
mov eax, dword [ebp + 0xdc]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 0x14]
mov esi, dword [esp + 0x34]
xor edi, edi
cmp esi, edi
je 0x497d24
test byte [esi + 0x10e], 1
je 0x497d1c
push esi
lea ecx, [ebp + 0xa8]
call fcn.00434320
push esi
mov ecx, ebp
call fcn.0049bc70
cmp dword [esi + 0x108], edi
je 0x497d0e
lea ecx, [esi + 4]
push ecx
call fcn.00471a00
add esp, 4
push eax
push str.PIM:_Unloading__s_n
call fcn.00473640
mov edx, dword [esi + 0x108]
add esp, 8
push edx
call dword [0x4d6364]
mov dword [esi + 0x108], edi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
mov ebx, 1
jmp 0x497d28
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
cmp esi, edi
je 0x497d99
test byte [esi + 0x10e], 1
je 0x497d91
push esi
lea ecx, [ebp + 0xa8]
call fcn.00434320
push esi
lea ecx, [ebp + 0x1c]
call fcn.0049bc70
cmp dword [esi + 0x108], edi
je 0x497d83
lea eax, [esi + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
push str.PIM:_Unloading__s_n
call fcn.00473640
mov ecx, dword [esi + 0x108]
add esp, 8
push ecx
call dword [0x4d6364]
mov dword [esi + 0x108], edi
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov ebx, 1
jmp 0x497d99
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov esi, dword [esp + 0x38]
cmp esi, edi
je 0x497e0a
test byte [esi + 0x10e], 1
je 0x497e02
push esi
lea ecx, [ebp + 0xa8]
call fcn.00434320
push esi
lea ecx, [ebp + 0x38]
call fcn.0049bc70
cmp dword [esi + 0x108], edi
je 0x497df4
lea ecx, [esi + 4]
push ecx
call fcn.00471a00
add esp, 4
push eax
push str.PIM:_Unloading__s_n
call fcn.00473640
mov edx, dword [esi + 0x108]
add esp, 8
push edx
call dword [0x4d6364]
mov dword [esi + 0x108], edi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
mov ebx, 1
jmp 0x497e0a
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
mov esi, dword [esp + 0x28]
cmp esi, edi
je 0x497e7b
test byte [esi + 0x10e], 1
je 0x497e73
push esi
lea ecx, [ebp + 0xa8]
call fcn.00434320
push esi
lea ecx, [ebp + 0x54]
call fcn.0049bc70
cmp dword [esi + 0x108], edi
je 0x497e65
lea eax, [esi + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
push str.PIM:_Unloading__s_n
call fcn.00473640
mov ecx, dword [esi + 0x108]
add esp, 8
push ecx
call dword [0x4d6364]
mov dword [esi + 0x108], edi
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov ebx, 1
jmp 0x497e7b
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
mov edi, dword [esp + 0x3c]
test edi, edi
je 0x497f2d
test byte [edi + 0x10e], 1
je 0x497f25
push edi
lea ecx, [ebp + 0xa8]
call fcn.00434320
lea ebx, [ebp + 0x70]
push edi
mov ecx, ebx
call fcn.00434320
mov esi, dword [ebx + 8]
sub esi, 2
js 0x497edc
push esi
mov ecx, ebx
call fcn.0049c140
push eax
mov ecx, edi
call fcn.0048c1b0
test eax, eax
je 0x497edc
mov eax, dword [ebx + 4]
dec esi
mov ecx, dword [eax + esi*4 + 4]
mov dword [eax + esi*4 + 8], ecx
mov edx, dword [ebx + 4]
mov dword [edx + esi*4 + 4], edi
jns 0x497eb3
mov eax, dword [edi + 0x108]
test eax, eax
je 0x497f17
lea eax, [edi + 4]
push eax
call fcn.00471a00
add esp, 4
push eax
push str.PIM:_Unloading__s_n
call fcn.00473640
mov ecx, dword [edi + 0x108]
add esp, 8
push ecx
call dword [0x4d6364]
mov dword [edi + 0x108], 0
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0xc]
mov ebx, 1
jmp 0x497f2d
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x498042
test byte [esi + 0x10e], 1
je 0x49803a
mov eax, dword [ebp + 0xb4]
mov edx, dword [ebp + 0xb0]
lea ecx, [eax + 1]
cmp edx, ecx
jne 0x497fbe
add eax, dword [ebp + 0xbc]
lea edx, [eax*4 + 4]
push edx
call fcn.004bd49b
mov ebx, eax
mov eax, dword [ebp + 0xb4]
mov esi, dword [ebp + 0xac]
mov edi, ebx
lea ecx, [eax*4 + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xac]
push eax
call fcn.004bd4c4
mov ecx, dword [ebp + 0xbc]
mov eax, dword [ebp + 0xb4]
mov esi, dword [esp + 0x24]
add esp, 8
add eax, ecx
mov dword [ebp + 0xac], ebx
mov dword [ebp + 0xb4], eax
mov edx, dword [ebp + 0xb0]
mov eax, dword [ebp + 0xac]
push esi
lea ecx, [ebp + 0x8c]
mov dword [eax + edx*4], esi
mov edx, dword [ebp + 0xb0]
inc edx
mov dword [ebp + 0xb0], edx
call fcn.0049bc70
mov eax, dword [esi + 0x108]
test eax, eax
je 0x498021
lea ecx, [esi + 4]
push ecx
call fcn.00471a00
add esp, 4
push eax
push str.PIM:_Unloading__s_n
call fcn.00473640
mov edx, dword [esi + 0x108]
add esp, 8
push edx
call dword [0x4d6364]
mov dword [esi + 0x108], 0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x240
ret 8
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x240
ret 8