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

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x78]
xor ebp, ebp
cmp dword [edi], ebp
jne 0x4f89de
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x60
ret
mov ebx, dword [esp + 0x74]
push edi
push ebx
call fcn.004f88c0
add esp, 8
cmp eax, 0xffffffff
jne 0x4f8a2b
mov eax, dword [esp + 0x80]
cmp eax, ebp
je 0x4f8a0a
push eax
push ebx
call fcn.004f8920
add esp, 8
mov esi, eax
jmp 0x4f8a0c
xor esi, esi
mov eax, dword [esp + 0x7c]
cmp eax, ebp
je 0x4f8ebd
push eax
call fcn.004fc410
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov eax, dword [ebx]
lea ecx, [esp + 0x50]
add eax, 2
push eax
push ecx
call fcn.004f9c10
add esp, 8
cmp eax, ebp
jne 0x4f8ebf
mov edx, dword [ebx]
lea eax, [esp + 0x40]
add edx, 2
push eax
mov dword [esp + 0x54], edx
call fcn.004f9b40
mov esi, eax
add esp, 4
cmp esi, ebp
jne 0x4f8eb0
lea ecx, [esp + 0x60]
push ecx
call fcn.004f9b40
mov esi, eax
add esp, 4
cmp esi, ebp
jne 0x4f8ea3
lea edx, [esp + 0x20]
push ebx
push edx
call fcn.004f9b80
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4f8e96
lea eax, [esp + 0x30]
push edi
push eax
call fcn.004f9b80
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x4f8e89
mov ecx, dword [ebx + 8]
mov esi, dword [edi + 8]
xor edx, edx
cmp ecx, esi
lea eax, [esp + 0x30]
mov dword [esp + 0x38], ebp
setne dl
push eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ebp
call fcn.004f8990
cdq
mov ecx, 0x1c
add esp, 4
idiv ecx
cmp edx, 0x1b
jge 0x4f8b27
mov edi, 0x1b
lea eax, [esp + 0x20]
sub edi, edx
lea edx, [esp + 0x20]
push edx
push edi
push eax
mov dword [esp + 0x1c], edi
call fcn.004faca0
mov esi, eax
add esp, 0xc
cmp esi, ebp
jne 0x4f8e7c
lea ecx, [esp + 0x30]
lea edx, [esp + 0x30]
push ecx
push edi
push edx
call fcn.004faca0
mov esi, eax
add esp, 0xc
cmp esi, ebp
jne 0x4f8e7c
jmp 0x4f8b2b
mov dword [esp + 0x10], ebp
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x30]
lea ebx, [eax - 1]
lea ebp, [ecx - 1]
mov edi, ebx
sub edi, ebp
push edi
push edx
call fcn.004fa710
mov esi, eax
add esp, 8
test esi, esi
jne 0x4f8e7c
lea eax, [esp + 0x30]
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.004f8850
add esp, 8
cmp eax, 0xffffffff
je 0x4f8baf
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x20]
push edx
mov ecx, dword [eax + edi*4]
inc ecx
mov dword [eax + edi*4], ecx
lea eax, [esp + 0x34]
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.004fb400
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4f8e7c
lea edx, [esp + 0x30]
lea eax, [esp + 0x20]
push edx
push eax
call fcn.004f8850
add esp, 8
cmp eax, 0xffffffff
jne 0x4f8b6c
lea ecx, [esp + 0x30]
push edi
push ecx
call fcn.004fb2a0
lea eax, [ebp + 1]
add esp, 8
cmp ebx, eax
jl 0x4f8e19
cmp ebx, dword [esp + 0x20]
jg 0x4f8e0d
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
mov eax, dword [edi + ebx*4]
mov esi, dword [edx + ebp*4]
cmp eax, esi
jne 0x4f8c01
mov ecx, dword [esp + 0x5c]
mov eax, ebx
sub eax, ebp
dec eax
mov dword [esp + 0x78], eax
lea edi, [eax*4]
mov dword [edi + ecx], 0xfffffff
jmp 0x4f8c56
mov ecx, 0x1c
xor edx, edx
call 0x512970
mov ecx, dword [edi + ebx*4 - 4]
xor edi, edi
or edx, edi
push edi
or eax, ecx
push esi
push edx
push eax
call 0x512b80
test edx, edx
ja 0x4f8c2b
cmp eax, 0xfffffff
jbe 0x4f8c38
mov eax, 0xfffffff
mov dword [esp + 0x1c], 0
mov edx, ebx
sub edx, ebp
and eax, 0xfffffff
lea ecx, [edx - 1]
mov dword [esp + 0x78], ecx
lea edi, [ecx*4]
mov ecx, dword [esp + 0x5c]
mov dword [edi + ecx], eax
mov eax, dword [esp + 0x5c]
mov edx, dword [edi + eax]
inc edx
and edx, 0xfffffff
mov dword [edi + eax], edx
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x40]
push edx
mov ecx, dword [edi + eax]
dec ecx
and ecx, 0xfffffff
mov dword [edi + eax], ecx
call fcn.004fc410
lea eax, [ebp - 1]
add esp, 4
test eax, eax
jge 0x4f8c90
xor eax, eax
jmp 0x4f8c98
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + ebp*4 - 4]
mov ecx, dword [esp + 0x4c]
mov dword [ecx], eax
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov eax, dword [edx + ebp*4]
lea edx, [esp + 0x40]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x40], 2
push edx
mov ecx, dword [edi + eax]
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.004fada0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4f8e7c
lea eax, [ebx - 2]
test eax, eax
jge 0x4f8ce3
xor eax, eax
jmp 0x4f8cea
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + eax*4]
mov edx, dword [esp + 0x6c]
mov dword [edx], eax
lea eax, [ebx - 1]
test eax, eax
jge 0x4f8cfb
xor eax, eax
jmp 0x4f8d03
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + ebx*4 - 4]
mov edx, dword [esp + 0x6c]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x6c]
mov ecx, dword [eax + ebx*4]
lea eax, [esp + 0x60]
mov dword [edx + 8], ecx
lea ecx, [esp + 0x40]
push eax
push ecx
mov dword [esp + 0x68], 3
call fcn.004f88c0
add esp, 8
cmp eax, 1
je 0x4f8c67
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x40]
push edx
lea edx, [esp + 0x34]
mov ecx, dword [edi + eax]
push ecx
push edx
call fcn.004fada0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4f8e7c
mov eax, dword [esp + 0x78]
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.004fa710
mov esi, eax
add esp, 8
test esi, esi
jne 0x4f8e7c
lea edx, [esp + 0x20]
lea eax, [esp + 0x40]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.004fb400
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4f8e7c
cmp dword [esp + 0x28], 1
jne 0x4f8e0d
lea edx, [esp + 0x40]
lea eax, [esp + 0x30]
push edx
push eax
call fcn.004f8920
mov esi, eax
add esp, 8
test esi, esi
jne 0x4f8e7c
mov ecx, dword [esp + 0x78]
lea edx, [esp + 0x40]
push ecx
push edx
call fcn.004fa710
mov esi, eax
add esp, 8
test esi, esi
jne 0x4f8e7c
lea eax, [esp + 0x20]
lea ecx, [esp + 0x40]
push eax
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.004f86c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4f8e7c
mov eax, dword [esp + 0x5c]
mov ecx, dword [edi + eax]
dec ecx
and ecx, 0xfffffff
mov dword [edi + eax], ecx
dec ebx
lea eax, [ebp + 1]
cmp ebx, eax
jge 0x4f8bc8
mov edx, dword [esp + 0x74]
mov esi, dword [esp + 0x7c]
test esi, esi
mov eax, dword [edx + 8]
mov dword [esp + 0x28], eax
je 0x4f8e4b
lea ecx, [esp + 0x50]
push ecx
call fcn.004f87a0
lea edx, [esp + 0x54]
push esi
push edx
call fcn.004f9350
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esi + 8], eax
mov esi, dword [esp + 0x80]
test esi, esi
je 0x4f8e7a
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push 0
push ecx
lea eax, [esp + 0x28]
push edx
push eax
call fcn.004f8f70
lea ecx, [esp + 0x30]
push esi
push ecx
call fcn.004f9350
add esp, 0x18
xor esi, esi
lea edx, [esp + 0x30]
push edx
call fcn.004f87d0
add esp, 4
lea eax, [esp + 0x20]
push eax
call fcn.004f87d0
add esp, 4
lea ecx, [esp + 0x60]
push ecx
call fcn.004f87d0
add esp, 4
lea edx, [esp + 0x40]
push edx
call fcn.004f87d0
add esp, 4
lea eax, [esp + 0x50]
push eax
call fcn.004f87d0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret