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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4f8e02
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 4]
mov edx, dword [eax + 0x78]
mov dword [ebp - 0x14], edx
mov edx, dword [eax + 0x7c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
add eax, 0x18
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
add eax, 0x1c
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
add eax, 0x20
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
add eax, 0x24
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 8], 0xffff
jbe 0x4f8ca3
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 8]
call fcn.00404fc0
mov eax, dword [ebp - 0x24]
test eax, eax
jbe 0x4f8cac
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x34], 1
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x34]
dec edx
shl edx, 2
add eax, edx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
add edx, dword [ecx]
call fcn.00404fc0
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
call fcn.004051f0
jne 0x4f8c99
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
dec edx
add edx, edx
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
mov dword [ebp - 0x38], eax
jmp 0x4f8cac
inc dword [ebp - 0x34]
dec dword [ebp - 0x44]
jne 0x4f8c4e
jmp 0x4f8cac
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x38]
shl edx, 2
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x14]
jb 0x4f8ddc
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
cmp eax, dword [edx]
jb 0x4f8ddc
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
add edx, dword [ecx]
call fcn.00404fc0
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
call fcn.00404e60
jmp 0x4f8d40
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x4f8d10
mov eax, dword [ebp - 0x48]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x40]
push eax
mov edx, dword [ebp - 0x40]
mov eax, 0x4f8e18
call fcn.004053a4
mov edx, dword [ebp - 0x48]
sub edx, eax
push edx
mov edx, dword [ebp - 0x40]
mov eax, 0x4f8e18
call fcn.004053a4
mov edx, eax
inc edx
mov eax, dword [ebp - 0x40]
pop ecx
call fcn.004052c0
mov edx, dword [ebp - 0x40]
mov eax, 0x4f8e18
call fcn.004053a4
test eax, eax
jg 0x4f8cf9
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x4f8d68
mov eax, dword [ebp - 0x4c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x4f8d7f
mov eax, dword [ebp - 0x50]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x4c]
sub ecx, dword [ebp - 0x50]
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x3c]
call fcn.004052c0
mov eax, dword [ebp - 0x3c]
call fcn.00405258
push eax
call fcn.00407314
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4f8dbf
mov eax, dword [ebp - 0x3c]
call fcn.00405258
push eax
call fcn.004073d4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jbe 0x4f8de7
mov eax, dword [ebp - 0x40]
call fcn.00405258
mov edx, eax
mov eax, dword [ebp - 0x20]
call fcn.004f8b84
mov dword [ebp - 0xc], eax
jmp 0x4f8de7
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
add eax, dword [edx]
mov dword [ebp - 0xc], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f8e09
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00404dec
ret