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

Disassembly:
push 0xffffffffffffffff
push 0x578fb8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x8c]
mov dword fs:[0], eax
mov ebx, dword [esp + 0xa0]
xor ebp, ebp
cmp dword [ebx + 8], ebp
je 0x49990b
mov esi, dword [esp + 0x9c]
push ebx
push esi
call fcn.00494060
add esp, 8
cmp eax, 0xffffffff
jne 0x499768
mov eax, dword [esp + 0xa8]
cmp eax, ebp
je 0x49974b
push eax
push esi
call fcn.00493b60
add esp, 8
mov esi, eax
jmp 0x49974d
xor esi, esi
mov eax, dword [esp + 0xa4]
cmp eax, ebp
je 0x499761
push eax
call fcn.00493aa0
add esp, 4
mov eax, esi
jmp 0x499c9c
mov eax, dword [esi + 8]
add eax, 2
push eax
lea ecx, [esp + 0x68]
call fcn.00493930
mov edi, dword [esp + 0x68]
mov dword [esp + 0x94], ebp
cmp edi, ebp
je 0x499825
mov ecx, dword [esi + 8]
add ecx, 2
mov dword [esp + 0x6c], ecx
push esi
lea ecx, [esp + 0x2c]
call fcn.004937f0
push ebx
lea ecx, [esp + 0x40]
mov byte [esp + 0x98], 1
call fcn.004937f0
lea ecx, [esp + 0x50]
mov byte [esp + 0x94], 2
call fcn.004938e0
lea ecx, [esp + 0x78]
mov byte [esp + 0x94], 3
call fcn.004938e0
mov byte [esp + 0x94], 4
cmp dword [esp + 0x2c], ebp
jne 0x499843
lea ecx, [esp + 0x78]
mov byte [esp + 0x94], 3
call fcn.00493a20
lea ecx, [esp + 0x50]
mov byte [esp + 0x94], 2
call fcn.00493a20
lea ecx, [esp + 0x3c]
mov byte [esp + 0x94], 1
call fcn.00493a20
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 0
call fcn.00493a20
lea ecx, [esp + 0x64]
mov dword [esp + 0x94], 0xffffffff
call fcn.00493a20
mov eax, 0xfffffffe
jmp 0x499c9c
cmp dword [esp + 0x40], ebp
je 0x4997e1
mov edx, dword [esi + 0x10]
xor eax, eax
cmp edx, dword [ebx + 0x10]
lea ecx, [esp + 0x3c]
setne al
push ecx
mov dword [esp + 0x50], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x20], eax
call fcn.00493ec0
cdq
mov ecx, 0x1c
idiv ecx
add esp, 4
cmp edx, 0x1b
jge 0x499915
mov esi, 0x1b
sub esi, edx
lea edx, [esp + 0x28]
push edx
mov eax, edx
push esi
push eax
mov dword [esp + 0x20], esi
call fcn.004944e0
add esp, 0xc
cmp eax, ebp
jne 0x4998b3
lea ecx, [esp + 0x3c]
push ecx
mov edx, ecx
push esi
push edx
call fcn.004944e0
add esp, 0xc
cmp eax, ebp
je 0x499919
lea ecx, [esp + 0x78]
mov byte [esp + 0x94], 3
call fcn.00493a20
lea ecx, [esp + 0x50]
mov byte [esp + 0x94], 2
call fcn.00493a20
lea ecx, [esp + 0x3c]
mov byte [esp + 0x94], 1
call fcn.00493a20
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 0
call fcn.00493a20
lea ecx, [esp + 0x64]
mov dword [esp + 0x94], 0xffffffff
call fcn.00493a20
mov eax, 0xfffffffd
jmp 0x499c9c
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x44]
dec ebp
dec ebx
mov esi, ebp
sub esi, ebx
lea eax, [esp + 0x3c]
push esi
push eax
mov dword [esp + 0x20], ebx
call fcn.00494200
add esp, 8
test eax, eax
jne 0x4998b3
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00495e20
add esp, 8
cmp eax, 0xffffffff
je 0x49998f
inc dword [edi + esi*4]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x40]
push ecx
mov edx, eax
push edx
call fcn.00497760
add esp, 0xc
test eax, eax
jne 0x4998b3
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00495e20
add esp, 8
cmp eax, 0xffffffff
jne 0x499958
lea edx, [esp + 0x3c]
push esi
push edx
call fcn.00494950
lea eax, [ebx + 1]
add esp, 8
cmp ebp, eax
jl 0x499bce
jmp 0x4999b0
cmp ebp, dword [esp + 0x30]
jg 0x499bc2
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x4997e1
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x4997e1
mov eax, dword [edx + ebp*4]
mov ecx, dword [ecx + ebx*4]
cmp eax, ecx
jne 0x4999ea
mov esi, ebp
sub esi, ebx
mov dword [edi + esi*4 - 4], 0xfffffff
jmp 0x499a2f
mov edx, dword [edx + ebp*4 - 4]
xor esi, esi
shld esi, eax, 0x1c
xor ebx, ebx
push ebx
push ecx
shl eax, 0x1c
or esi, ebx
or eax, edx
push esi
push eax
call fcn.005561a0
test edx, edx
ja 0x499a11
cmp eax, 0xfffffff
jbe 0x499a1e
mov eax, 0xfffffff
mov dword [esp + 0x24], 0
mov ebx, dword [esp + 0x18]
mov esi, ebp
sub esi, ebx
and eax, 0xfffffff
mov dword [edi + esi*4 - 4], eax
mov eax, dword [edi + esi*4 - 4]
inc eax
and eax, 0xfffffff
mov dword [edi + esi*4 - 4], eax
mov ecx, dword [edi + esi*4 - 4]
dec ecx
lea edx, [esp + 0x50]
and ecx, 0xfffffff
push edx
mov dword [edi + esi*4 - 4], ecx
call fcn.00493aa0
mov eax, dword [esp + 0x58]
add esp, 4
test eax, eax
je 0x4997e1
lea ecx, [ebx - 1]
test ecx, ecx
jge 0x499a70
xor ecx, ecx
jmp 0x499a78
mov edx, dword [esp + 0x40]
mov ecx, dword [edx + ebx*4 - 4]
mov dword [eax], ecx
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + ebx*4]
mov dword [eax + 4], edx
mov ecx, dword [edi + esi*4 - 4]
lea eax, [esp + 0x50]
push eax
push ecx
mov edx, eax
push edx
mov dword [esp + 0x64], 2
call fcn.00494610
add esp, 0xc
test eax, eax
jne 0x4998b3
mov edx, dword [esp + 0x7c]
test edx, edx
je 0x4997e1
mov ecx, dword [esp + 0x2c]
lea eax, [ebp - 2]
test eax, eax
jge 0x499ac4
xor eax, eax
jmp 0x499ac7
mov eax, dword [ecx + eax*4]
mov dword [edx], eax
lea eax, [ebp - 1]
test eax, eax
jge 0x499ad4
xor eax, eax
jmp 0x499ad8
mov eax, dword [ecx + ebp*4 - 4]
mov dword [edx + 4], eax
mov ecx, dword [ecx + ebp*4]
mov dword [edx + 8], ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x88], 3
call fcn.00494060
add esp, 8
cmp eax, 1
je 0x499a3d
mov edx, dword [edi + esi*4 - 4]
lea ecx, [esp + 0x50]
push ecx
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00494610
add esp, 0xc
test eax, eax
jne 0x4998b3
lea eax, [esi - 1]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00494200
add esp, 8
test eax, eax
jne 0x4998b3
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x54]
push eax
mov ecx, edx
push ecx
call fcn.00497760
add esp, 0xc
test eax, eax
jne 0x4998b3
cmp dword [esp + 0x38], 1
jne 0x499bc2
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00493b60
add esp, 8
test eax, eax
jne 0x4998b3
lea eax, [esi - 1]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.00494200
add esp, 8
test eax, eax
jne 0x4998b3
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x54]
push eax
mov ecx, edx
push ecx
call fcn.00495db0
add esp, 0xc
test eax, eax
jne 0x4998b3
mov edx, dword [edi + esi*4 - 4]
dec edx
and edx, 0xfffffff
mov dword [edi + esi*4 - 4], edx
dec ebp
lea eax, [ebx + 1]
cmp ebp, eax
jge 0x4999b0
cmp dword [esp + 0x30], 0
jne 0x499bdf
mov dword [esp + 0x38], 0
jmp 0x499bed
mov eax, dword [esp + 0x9c]
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x38], ecx
mov esi, dword [esp + 0xa4]
test esi, esi
je 0x499c16
lea edx, [esp + 0x64]
push edx
call fcn.00493be0
add esp, 4
push esi
lea ecx, [esp + 0x68]
call fcn.004938a0
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x10], eax
mov esi, dword [esp + 0xa8]
test esi, esi
je 0x499c42
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x2c]
push ecx
push edx
mov eax, ecx
push eax
call fcn.00495960
add esp, 0x10
push esi
lea ecx, [esp + 0x2c]
call fcn.004938a0
lea ecx, [esp + 0x78]
mov byte [esp + 0x94], 3
call fcn.00493a20
lea ecx, [esp + 0x50]
mov byte [esp + 0x94], 2
call fcn.00493a20
lea ecx, [esp + 0x3c]
mov byte [esp + 0x94], 1
call fcn.00493a20
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 0
call fcn.00493a20
lea ecx, [esp + 0x64]
mov dword [esp + 0x94], 0xffffffff
call fcn.00493a20
xor eax, eax
mov ecx, dword [esp + 0x8c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret