Function at 0x497700
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8ec
mov edx, dword [esp + 0x8f0]
push ebx
push ebp
mov ebp, dword [esp + 0x91c]
mov ecx, dword [edx + 0x10]
push esi
mov eax, dword [ebp + 0x44]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x904]
mov dword [esp + 0x50], eax
mov eax, dword [edx + 0x14]
push edi
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x90c]
sub eax, ecx
mov ecx, 0x6a
mov dword [esp + 0x50], eax
xor eax, eax
lea edi, [esp + 0x5c]
mov ebx, dword [esp + 0x904]
rep stosd dword es:[edi], eax
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0x6c]
mov dword [esp + 0x12c], ecx
mov ecx, eax
shr ecx, 2
and ecx, 1
xor esi, esi
mov dword [esp + 0x134], ecx
mov ecx, dword [ebx + 0x10]
and ecx, 0x2000
mov dword [esp + 0x24], esi
mov dword [esp + 0x13c], ecx
mov ecx, dword [ebx + 0x18]
mov dword [esp + 0x30], esi
mov dword [esp + 0xf0], esi
mov esi, ecx
mov dword [esp + 0x1b4], ecx
imul esi, ecx
lea ecx, [esp + 0x73b]
mov dword [esp + 0x1e4], esi
not eax
and ecx, 0xffffffc0
and eax, 1
mov dword [esp + 0x1b0], ecx
mov ecx, dword [esp + 0x91c]
mov dword [esp + 0x1b8], eax
mov eax, dword [edx + 0x78]
mov dword [esp + 0x1c8], eax
mov eax, dword [ecx + 4]
mov ecx, 0x6a
lea esi, [esp + 0x5c]
lea edi, [esp + 0x204]
mov dword [esp + 0x120], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x10], 0x100000
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x6a
lea esi, [esp + 0x5c]
lea edi, [esp + 0x3ac]
mov dword [ebx + 0x20], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x6a
lea esi, [esp + 0x5c]
lea edi, [esp + 0x554]
mov dword [esp + 0x2d8], eax
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x628], eax
mov eax, dword [ebp + 0x20]
mov dword [ebx + 0x24], eax
mov dword [esp + 0x658], eax
mov dword [esp + 0x480], eax
mov eax, dword [edx + 0x14]
xor ebp, ebp
cmp eax, ebp
jbe 0x497e48
mov esi, dword [0x50553c]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], ebp
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x58]
xor edx, edx
xor edi, edi
div ecx
xor edx, edx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x44], esi
imul eax, ecx
mov ecx, dword [esp + 0x938]
lea eax, [eax + ecx - 1]
div ecx
mov edx, eax
mov eax, dword [0x505538]
imul edx, dword [esp + 0x3c]
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x900]
mov dword [esp + 0x38], edx
mov eax, dword [eax + 0x10]
test eax, eax
jbe 0x497e1f
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x28], ecx
jmp 0x4978c1
mov edx, dword [esp + 0x38]
imul eax, ebp
add eax, edi
mov esi, dword [ebx + 0x44]
lea ecx, [eax + eax*2]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x54]
shl eax, 3
add esi, eax
add eax, ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x20], eax
cmp ecx, edx
jne 0x4978f5
test ebp, ebp
mov dword [esp + 0x1c], 1
ja 0x4978fd
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x934]
mov ecx, dword [esp + 0x930]
push eax
lea eax, [ebx + 0x38]
mov dword [esi + 0xec], 0xffffffff
push eax
mov eax, dword [edx]
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x938]
push edx
mov edx, dword [esp + 0x938]
mov ecx, dword [eax]
mov eax, dword [esp + 0x930]
push ecx
push edx
mov ecx, dword [eax]
mov edx, dword [esp + 0x934]
push ecx
mov ecx, dword [esp + 0x934]
mov eax, dword [edx]
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x934]
push edx
push eax
push ebp
lea ecx, [esp + 0x580]
push edi
lea edx, [esp + 0x3dc]
push ecx
lea eax, [esp + 0x238]
push edx
lea ecx, [esp + 0x94]
push eax
push ecx
call fcn.00497e70
mov edx, dword [esp + 0x964]
add esp, 0x40
cmp dword [edx + 0x14], 3
je 0x4979dd
mov ecx, dword [esp + 0x20]
mov eax, 0x10
cmp dword [ecx + 0xec], eax
jne 0x4979dd
mov dword [esi + 0xec], eax
mov edx, dword [0x505538]
mov dword [esi + 0x194], edx
mov eax, dword [0x50553c]
mov dword [esi + 0x198], eax
mov ecx, dword [0x505538]
mov dword [esi], ecx
mov edx, dword [0x50553c]
mov dword [esi + 4], edx
mov dword [esi + 0x154], 0
jmp 0x497df6
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x904]
push ecx
mov ecx, dword [esp + 0x914]
push edx
mov edx, dword [esp + 0x5c]
push esi
push eax
mov eax, dword [ebx + 0x10]
push ecx
push edx
push eax
push ebp
push edi
call fcn.00498880
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xec]
add esp, 0x28
cmp eax, 4
jne 0x497a28
mov ecx, dword [esp + 0x10]
jmp 0x497c84
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
push edx
push eax
lea edx, [esp + 0x20c]
push ecx
push edx
mov edx, dword [esp + 0x910]
lea eax, [esp + 0x20]
push 3
lea ecx, [esp + 0x54]
push eax
mov eax, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebx + 0x10]
push esi
push edx
push eax
push ecx
push ebp
push edi
call fcn.004980d0
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0xc8]
mov ecx, dword [esp + 0xc4]
push edx
push eax
lea edx, [esp + 0x3e8]
push ecx
push edx
mov edx, dword [esp + 0x944]
lea eax, [esp + 0x54]
push 2
lea ecx, [esp + 0x90]
push eax
mov eax, dword [ebx + 0x24]
push ecx
mov ecx, dword [ebx + 0x10]
push esi
push edx
push eax
push ecx
push ebp
push edi
call fcn.004980d0
mov eax, dword [ebx + 0x10]
mov edx, dword [esp + 0x78]
add esp, 0x68
test eax, 0x10000000
je 0x497ac4
mov dword [esp + 0x18], edx
jmp 0x497ace
mov ecx, edx
sar ecx, 1
add ecx, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x214]
cmp edx, ecx
jg 0x497afd
lea edx, [esp + 0x204]
lea ecx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x904]
push ecx
push edx
push eax
push ebp
push edi
call fcn.00498450
add esp, 0x18
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3bc]
cmp ecx, eax
jg 0x497b2f
mov eax, dword [esp + 0x900]
lea ecx, [esp + 0x3ac]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [ebx + 0x10]
push edx
push eax
push ecx
push ebp
push edi
call fcn.00498450
add esp, 0x18
mov edx, dword [esp + 0x3d4]
mov eax, dword [esp + 0x3d0]
mov ecx, dword [esp + 0x22c]
push edx
mov edx, dword [esp + 0x22c]
push eax
push ecx
lea eax, [esp + 0x560]
push edx
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x918]
lea eax, [esp + 0x58]
push edx
mov edx, dword [ebx + 0x10]
push eax
push ecx
push edx
push ebp
push edi
call fcn.004994a0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x594]
mov edx, eax
add esp, 0x30
sar edx, 3
add edx, eax
cmp ecx, edx
jge 0x497b9b
test dword [ebx + 0x10], 0x8000000
je 0x497b9f
cmp ecx, eax
jg 0x497bc1
mov edx, dword [esp + 0x900]
lea eax, [esp + 0x554]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [ebx + 0x10]
push ecx
push edx
push eax
push ebp
push edi
call fcn.004999a0
jmp 0x497be1
mov eax, dword [esp + 0x900]
lea ecx, [esp + 0x554]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [ebx + 0x10]
push edx
push eax
push ecx
push ebp
push edi
call fcn.00499ca0
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x84]
add esp, 0x18
lea edx, [ecx + ecx]
cmp eax, edx
jg 0x497c2c
mov eax, dword [ebx + 0x10]
test eax, 0x4000000
jne 0x497c08
cmp ecx, 0x2ee
jg 0x497c10
cmp ecx, 0x3e8
jle 0x497c2c
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
push eax
call fcn.00499120
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov eax, dword [esp + 0x1b4]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x14]
shl edx, 3
cmp eax, edx
jae 0x497c9d
inc eax
xor edx, edx
mov dword [esp + 0x18], eax
lea eax, [ecx + ecx*4]
mov ecx, dword [esp + 0x18]
lea eax, [eax + eax*4]
shl eax, 2
div ecx
cmp eax, 0x32
jbe 0x497c99
lea eax, [esp + 0x5c]
mov dword [esp + 0xec], 0
push eax
push esi
call fcn.00498610
mov eax, dword [esi + 0xec]
add esp, 8
cmp eax, 4
jne 0x497c99
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x154], ecx
mov dword [esi + 0x178], 0
jmp 0x497df6
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0xc]
test ah, 0x20
je 0x497cf4
mov edx, dword [esp + 0x1c]
push edx
mov edx, dword [ebx + 0x10]
push ecx
mov ecx, dword [esp + 0x908]
push ebp
push edi
push ecx
push eax
lea eax, [esp + 0x60]
push edx
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x5c]
push eax
push ecx
push edx
lea eax, [esp + 0x57c]
push esi
lea ecx, [esp + 0x230]
push eax
lea edx, [esp + 0x3dc]
push ecx
lea eax, [esp + 0x90]
push edx
push eax
call fcn.0049df60
add esp, 0x3c
jmp 0x497d2e
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x44]
push edx
push eax
push ecx
lea edx, [esp + 0x564]
push esi
lea eax, [esp + 0x218]
push edx
lea ecx, [esp + 0x3c4]
push eax
lea edx, [esp + 0x78]
push ecx
push edx
call fcn.00499d60
add esp, 0x24
mov eax, dword [esi + 0xec]
cmp eax, 3
mov dword [esp + 0x1c], eax
je 0x497d42
cmp eax, 1
jne 0x497d98
mov eax, dword [esp + 0x134]
lea ecx, [esi + 0x124]
test eax, eax
jne 0x497d55
mov ecx, esi
mov eax, dword [esp + 0x24]
mov edx, dword [ecx]
cmp edx, eax
mov dword [esp + 0x14], ecx
jle 0x497d67
mov eax, edx
jmp 0x497d76
or ecx, 0xffffffff
sub ecx, edx
mov edx, dword [esp + 0x24]
cmp ecx, edx
jle 0x497d76
mov eax, ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 4]
cmp edx, eax
jle 0x497d85
mov eax, edx
jmp 0x497d90
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, eax
jle 0x497d90
mov eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
cmp eax, 2
je 0x497da2
cmp eax, 1
jne 0x497df6
mov eax, dword [esp + 0x134]
test eax, eax
je 0x497db5
add esi, 0x1b4
jmp 0x497dbb
add esi, 0x194
mov eax, dword [esp + 0x30]
mov edx, dword [esi]
cmp edx, eax
mov dword [esp + 0x14], esi
jle 0x497dcd
mov eax, edx
jmp 0x497dd8
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, eax
jle 0x497dd8
mov eax, ecx
mov edx, dword [esp + 0x14]
mov edx, dword [edx + 4]
cmp edx, eax
jle 0x497de7
mov eax, edx
jmp 0x497df2
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, eax
jle 0x497df2
mov eax, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x900]
mov edx, dword [esp + 0x28]
inc edi
inc edx
mov eax, dword [eax + 0x10]
mov dword [esp + 0x28], edx
cmp edi, eax
jb 0x4978bd
mov esi, dword [0x50553c]
mov ecx, dword [esp + 0x938]
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
add edi, ecx
mov ecx, dword [esp + 0x3c]
add edx, ecx
inc ebp
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x900]
mov dword [esp + 0x34], edi
cmp ebp, dword [edx + 0x14]
jb 0x497861
mov eax, dword [esp + 0x24]
push eax
call fcn.00490980
mov ecx, dword [esp + 0x34]
mov dword [ebx + 0x20], eax
push ecx
call fcn.00490980
add esp, 8
mov dword [ebx + 0x24], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ec
ret