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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
mov ebx, ebp
push esi
mov esi, dword [esp + 0x5c]
push edi
push dword [esp + 0x70]
mov eax, dword [esi + 4]
sub ebx, eax
push dword [esi + 0x64]
mov dword [esp + 0x20], eax
push ebp
mov dword [esp + 0x2c], ebx
call fcn.00496a48
mov ecx, dword [esi + 0x198]
xor edx, edx
and dword [esp + 0x48], 0
add esp, 0xc
and dword [esp + 0x40], 0
inc edx
mov dword [esp + 0x50], ecx
mov edi, dword [ecx + eax*4]
mov ecx, dword [esi + 0x60]
dec ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x1a0]
shl edx, cl
mov ecx, dword [esi + 8]
dec edx
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x30], ecx
add ecx, eax
mov dword [esp + 0x24], eax
add eax, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov eax, ebx
sub eax, edx
mov dword [esp + 0x38], ecx
cmp edx, ebx
mov dword [esp + 0x54], edx
sbb ecx, ecx
and dword [esp + 0x10], 0
dec dword [esp + 0x7c]
and ecx, eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x28], eax
mov eax, edx
mov dword [esp + 0x44], ecx
and eax, ebx
mov ecx, dword [esp + 0x2c]
lea ecx, [ecx + eax*8]
mov dword [esp + 0x14], ecx
lea eax, [ebx + 8]
add ecx, 4
mov dword [esp + 0x58], eax
cmp dword [esp + 0x70], 3
mov ebx, eax
mov dword [esp + 0x1c], ecx
jne 0x497703
push ebp
push esi
call fcn.00497058
pop ecx
pop ecx
cmp eax, dword [esp + 0x28]
jbe 0x497703
mov esi, dword [esp + 0x20]
sub esi, eax
mov dword [esp + 0x48], esi
cmp esi, 0x40000
jae 0x497703
cmp dword [esp + 0x74], 0
je 0x4976ad
cmp eax, dword [esp + 0x24]
jae 0x4976ad
add eax, dword [esp + 0x30]
push 3
push eax
mov dword [esp + 0x78], eax
call fcn.00497e88
push 3
push ebp
mov esi, eax
call fcn.00497e88
add esp, 0x10
cmp esi, eax
jne 0x497703
push dword [esp + 0x34]
mov eax, dword [esp + 0x74]
push dword [esp + 0x3c]
add eax, 3
push dword [esp + 0x70]
push eax
lea eax, [ebp + 3]
push eax
call fcn.00495b70
mov esi, dword [esp + 0x5c]
add esp, 0x14
add eax, 3
jmp 0x4976cd
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x7c]
add ecx, eax
mov al, byte [ecx + edx]
cmp al, byte [edx + ebp]
jne 0x497703
push dword [esp + 0x68]
push ecx
push ebp
call fcn.00495ac8
add esp, 0xc
cmp eax, dword [esp + 0x7c]
jbe 0x497703
mov edx, dword [esp + 0x78]
lea ecx, [esi + 3]
xor esi, esi
mov dword [esp + 0x7c], eax
inc esi
mov dword [esp + 0x10], esi
mov dword [edx], ecx
mov dword [edx + 4], eax
cmp eax, 0x1000
ja 0x497888
add eax, ebp
cmp eax, dword [esp + 0x68]
je 0x497888
jmp 0x497707
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x20]
mov dword [edx + ecx*4], eax
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x49787a
dec eax
mov dword [esp + 0x6c], eax
cmp edi, dword [esp + 0x28]
jbe 0x497876
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x2c]
and eax, edi
lea eax, [ecx + eax*8]
mov ecx, dword [esp + 0x40]
cmp dword [esp + 0x3c], ecx
mov esi, ecx
mov dword [esp + 0x48], eax
cmovb esi, dword [esp + 0x3c]
cmp dword [esp + 0x74], 0
je 0x497799
lea eax, [esi + edi]
cmp eax, dword [esp + 0x24]
jae 0x497799
push dword [esp + 0x34]
mov eax, dword [esp + 0x34]
push dword [esp + 0x3c]
add eax, edi
push dword [esp + 0x70]
mov dword [esp + 0x7c], eax
add eax, esi
push eax
lea eax, [esi + ebp]
push eax
call fcn.00495b70
add esi, eax
add esp, 0x14
lea eax, [esi + edi]
cmp eax, dword [esp + 0x24]
jb 0x4977c6
mov edx, dword [esp + 0x18]
add edx, edi
jmp 0x4977ca
mov edx, dword [esp + 0x18]
add edx, edi
mov dword [esp + 0x70], edx
mov al, byte [edx + esi]
cmp al, byte [esi + ebp]
jne 0x4977ca
push dword [esp + 0x68]
lea eax, [esi + 1]
add eax, edx
push eax
lea eax, [esi + 1]
add eax, ebp
push eax
call fcn.00495ac8
inc esi
add esp, 0xc
add esi, eax
mov edx, dword [esp + 0x70]
cmp esi, dword [esp + 0x7c]
jbe 0x497817
mov ebp, dword [esp + 0x78]
lea ecx, [esi + edi]
mov eax, ebx
mov dword [esp + 0x7c], esi
sub eax, edi
cmp esi, eax
mov eax, dword [esp + 0x20]
cmovbe ecx, ebx
sub eax, edi
mov ebx, ecx
add eax, 3
mov ecx, dword [esp + 0x10]
mov dword [ebp + ecx*8], eax
mov eax, ebp
mov ebp, dword [esp + 0x64]
mov dword [eax + ecx*8 + 4], esi
inc ecx
mov dword [esp + 0x10], ecx
cmp esi, 0x1000
ja 0x497876
lea eax, [esi + ebp]
cmp eax, dword [esp + 0x68]
je 0x497876
mov al, byte [edx + esi]
cmp al, byte [esi + ebp]
jae 0x49783c
mov eax, dword [esp + 0x14]
mov dword [esp + 0x3c], esi
mov dword [eax], edi
cmp edi, dword [esp + 0x44]
jbe 0x497864
mov eax, dword [esp + 0x48]
add eax, 4
mov dword [esp + 0x14], eax
jmp 0x497854
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x40], esi
mov dword [ecx], edi
cmp edi, dword [esp + 0x44]
jbe 0x49786e
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
mov edi, dword [eax]
mov eax, dword [esp + 0x6c]
test eax, eax
jne 0x497722
jmp 0x497876
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x70]
jmp 0x49787e
lea eax, [esp + 0x70]
mov dword [esp + 0x1c], eax
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
and dword [ecx], 0
and dword [eax], 0
mov edx, dword [esp + 0x20]
lea ecx, [ebx - 8]
mov eax, dword [esp + 0x60]
inc edx
cmp ebx, dword [esp + 0x58]
pop edi
cmova edx, ecx
mov dword [eax + 0x14], edx
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret