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

Disassembly:
sub esp, 0x1a4
push esi
mov esi, dword [esp + 0x1ac]
cmp dword [esi + 0x58], 2
jge 0x4faa01
mov eax, 0xffffff7d
pop esi
add esp, 0x1a4
ret
mov eax, dword [esi + 4]
test eax, eax
jne 0x4faa15
mov eax, 0xffffff76
pop esi
add esp, 0x1a4
ret
push ebx
mov ebx, dword [esp + 0x1b8]
test ebx, ebx
push edi
jl 0x4fad0e
mov edi, dword [esp + 0x1b8]
jg 0x4faa37
test edi, edi
jb 0x4fad0e
cmp ebx, dword [esi + 0x14]
jg 0x4fad0e
jl 0x4faa4b
cmp edi, dword [esi + 0x10]
ja 0x4fad0e
or eax, 0xffffffff
push ebp
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
mov eax, dword [esi + 0x5c]
push eax
lea ebp, [esi + 0x78]
push ebp
call fcn.0050ada0
lea eax, [esi + 0x1e0]
push eax
call fcn.004fc490
push ebx
push edi
mov eax, esi
call fcn.004f9b40
mov ecx, dword [esi + 0x5c]
push ecx
lea edx, [esp + 0x64]
xor edi, edi
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call fcn.0050a620
lea eax, [esp + 0x68]
push eax
call fcn.0050ad50
add esp, 0x20
lea esp, [esp]
mov eax, dword [esi + 0x58]
mov ebx, 3
cmp eax, ebx
jl 0x4fab53
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.0050af40
add esp, 8
test eax, eax
jle 0x4fab53
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 0x48]
shl eax, 5
add eax, ecx
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x4fab48
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.004fbc60
mov ebx, eax
add esp, 8
test ebx, ebx
jge 0x4faaff
push 0
push ebp
call fcn.0050af40
add esp, 8
xor ebx, ebx
jmp 0x4fab28
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4fab14
push 0
push ebp
call fcn.0050af40
add esp, 8
jmp 0x4fab28
test edi, edi
je 0x4fab28
mov ecx, dword [esp + 0x14]
lea eax, [ebx + edi]
sar eax, 2
add ecx, eax
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov edx, edi
and edx, ecx
cmp edx, 0xffffffff
jne 0x4fac3d
mov dword [esp + 0x10], ebx
mov edi, ebx
jmp 0x4faaa0
push 0
push ebp
call fcn.0050af40
add esp, 8
test edi, edi
jne 0x4facd9
push 0xffffffffffffffff
lea eax, [esp + 0x20]
push 0xffffffffffffffff
push eax
call fcn.004f9b80
add esp, 0xc
test edx, edx
jl 0x4fac84
jg 0x4fab7e
test eax, eax
jb 0x4fac84
cmp dword [esi + 0x58], ebx
jl 0x4fabae
lea ecx, [esp + 0x1c]
push ecx
call fcn.0050a5f0
mov ecx, dword [esi + 0x5c]
add esp, 4
cmp ecx, eax
je 0x4faba9
call fcn.004fa570
lea edx, [esp + 0x4c]
push edx
call fcn.0050a690
add esp, 4
cmp dword [esi + 0x58], ebx
jge 0x4fac0d
lea eax, [esp + 0x1c]
push eax
call fcn.0050a5f0
mov edi, dword [esi + 0x34]
add esp, 4
xor ecx, ecx
test edi, edi
mov dword [esi + 0x5c], eax
jle 0x4fabdf
mov edx, dword [esi + 0x40]
lea ebx, [ebx]
cmp dword [edx], eax
je 0x4fabdf
mov ebx, dword [esi + 0x34]
inc ecx
add edx, 4
cmp ecx, ebx
jl 0x4fabd0
cmp ecx, edi
je 0x4fac94
push eax
push ebp
mov dword [esi + 0x60], ecx
call fcn.0050ada0
mov ecx, dword [esi + 0x5c]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.0050ada0
mov edi, dword [esp + 0x20]
add esp, 0x10
mov dword [esi + 0x58], 3
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.0050aa20
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.0050aa20
lea eax, [esp + 0x2c]
push eax
call fcn.0050a550
add esp, 0x14
mov dword [esp + 0x18], eax
jmp 0x4faaa0
mov edx, dword [esi + 0x60]
mov eax, dword [esi + 0x44]
mov ebx, edx
shl ebx, 4
sub edi, dword [ebx + eax]
sbb ecx, dword [ebx + eax + 4]
test ecx, ecx
jg 0x4fac5d
jl 0x4fac59
test edi, edi
jae 0x4fac5d
xor edi, edi
xor ecx, ecx
test edx, edx
jle 0x4fac73
add eax, 8
mov ebx, dword [eax]
add edi, ebx
mov ebx, dword [eax + 4]
adc ecx, ebx
add eax, 0x10
dec edx
jne 0x4fac64
mov eax, dword [esp + 0x14]
cdq
sub edi, eax
sbb ecx, edx
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], ecx
jmp 0x4face2
push 0xffffffffffffffff
push esi
call fcn.004fa970
add esp, 8
mov dword [esi + 0x54], edx
jmp 0x4facdf
or eax, 0xffffffff
lea ecx, [esp + 0x4c]
push ecx
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
call fcn.0050a690
lea eax, [esi + 0x1e0]
push eax
call fcn.004fc250
lea edx, [esi + 0x250]
push edx
call fcn.004fbe10
add esp, 0xc
pop ebp
pop edi
pop ebx
mov dword [esi + 0x58], 2
mov eax, 0xffffff77
pop esi
add esp, 0x1a4
ret
or eax, 0xffffffff
mov dword [esi + 0x54], eax
mov dword [esi + 0x50], eax
lea eax, [esp + 0x4c]
push eax
call fcn.0050a690
fld qword [0x5439b8]
add esp, 4
fstp qword [esi + 0x68]
fld qword [0x5439b8]
pop ebp
pop edi
fstp qword [esi + 0x70]
pop ebx
xor eax, eax
pop esi
add esp, 0x1a4
ret
pop edi
pop ebx
mov eax, 0xffffff7d
pop esi
add esp, 0x1a4
ret