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

Disassembly:
push 0xffffffffffffffff
push 0x4c4c1a
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x503870]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov edx, dword [ecx + 0x40]
sub edx, dword [ecx + 0x3c]
lea eax, [ecx + 0x30]
mov dword [esp + 0x18], eax
test edx, 0xfffffffc
jne 0x4fab14
push 0x4dd5e4
push 0x4dd5fc
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.004fa760
xor ebx, ebx
mov dword [esp + 0x88], ebx
mov edi, dword [esp + 0x20]
cmp edi, ebx
jne 0x4fa8e3
push 0x80004003
call 0x59f4d0
lea ecx, [esp + 0x1c]
push ecx
call fcn.004eb500
mov byte [esp + 0x88], 1
mov eax, dword [eax]
cmp eax, ebx
je 0x4fa8ff
mov ebp, dword [eax]
jmp 0x4fa901
xor ebp, ebp
mov byte [esp + 0x88], 0
lea edi, [esp + 0x1c]
call fcn.004eb4b0
lea edx, [esp + 0x30]
push edx
call fcn.00507a00
mov byte [esp + 0x88], 2
xor eax, eax
mov word [esp + 0x68], ax
mov edi, 7
push 1
mov eax, 0x4dd608
lea esi, [esp + 0x68]
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], ebx
call fcn.004e8f30
mov byte [esp + 0x88], 3
xor ecx, ecx
mov eax, ebp
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4fa967
sub eax, edx
sar eax, 1
push eax
mov eax, ebp
lea esi, [esp + 0x4c]
call fcn.004e8f30
mov byte [esp + 0x88], 4
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, esi
push ecx
call fcn.00537ec0
add esp, 0xc
mov byte [esp + 0x88], 3
mov esi, 8
cmp dword [esp + 0x60], esi
jb 0x4fa9bf
mov edx, dword [esp + 0x4c]
push edx
call 0x5600be
add esp, 4
xor eax, eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], ax
mov byte [esp + 0x88], 2
cmp dword [esp + 0x7c], esi
jb 0x4fa9e9
mov ecx, dword [esp + 0x68]
push ecx
call 0x5600be
add esp, 4
mov esi, dword [esp + 0x40]
xor edx, edx
mov dword [esp + 0x7c], edi
mov edi, dword [esp + 0x3c]
mov ecx, esi
sub ecx, edi
mov word [esp + 0x68], dx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ebp, edx
shr ebp, 0x1f
add ebp, edx
mov dword [esp + 0x78], ebx
test ebp, ebp
jle 0x4faae3
xor ecx, ecx
mov dword [esp + 0x1c], ecx
jmp 0x4faa3c
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
sub esi, edi
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x4faa62
call 0x5846f9
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + edi + 0x18], 8
jb 0x4faa6f
mov edi, dword [ecx + edi + 4]
jmp 0x4faa73
lea edi, [ecx + edi + 4]
push edi
call 0x585329
mov esi, dword [esp + 0x1c]
mov edx, dword [esi + 0xc]
add esp, 4
mov dword [esp + 0x24], eax
test edx, edx
jne 0x4faa8f
xor ecx, ecx
jmp 0x4faa97
mov ecx, dword [esi + 0x14]
sub ecx, edx
sar ecx, 2
mov esi, dword [esi + 0x10]
mov edi, esi
sub edi, edx
sar edi, 2
cmp edi, ecx
jae 0x4faab3
mov ecx, dword [esp + 0x18]
mov dword [esi], eax
add esi, 4
mov dword [ecx + 0x10], esi
jmp 0x4faad5
cmp edx, esi
jbe 0x4faabc
call 0x5846f9
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
push esi
push eax
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x34]
push eax
mov eax, ecx
call fcn.0050a020
add dword [esp + 0x1c], 0x1c
inc ebx
cmp ebx, ebp
jl 0x4faa30
mov byte [esp + 0x88], 0
lea ecx, [esp + 0x30]
push ecx
call fcn.004e8420
mov dword [esp + 0x88], 0xffffffff
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4fab10
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret