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

Disassembly:
sub esp, 0x1a4
push esi
mov esi, dword [esp + 0x1ac]
cmp dword [esi + 0x58], 2
jge 0x4776b1
mov eax, 0xffffff7d
pop esi
add esp, 0x1a4
ret
mov eax, dword [esi + 4]
test eax, eax
jne 0x4776c5
mov eax, 0xffffff76
pop esi
add esp, 0x1a4
ret
push ebx
mov ebx, dword [esp + 0x1b8]
test ebx, ebx
push edi
jl 0x4779be
mov edi, dword [esp + 0x1b8]
jg 0x4776e7
test edi, edi
jb 0x4779be
cmp ebx, dword [esi + 0x14]
jg 0x4779be
jl 0x4776fb
cmp edi, dword [esi + 0x10]
ja 0x4779be
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.004cc2b0
lea eax, [esi + 0x1e0]
push eax
call fcn.00479d40
push ebx
push edi
mov eax, esi
call fcn.004767c0
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.004cb010
lea eax, [esp + 0x68]
push eax
call fcn.004cc210
add esp, 0x20
lea esp, [esp]
mov eax, dword [esi + 0x58]
mov ebx, 3
cmp eax, ebx
jl 0x477803
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.004cc2d0
add esp, 8
test eax, eax
jle 0x477803
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 0x4777f8
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.004794d0
mov ebx, eax
add esp, 8
test ebx, ebx
jge 0x4777af
push 0
push ebp
call fcn.004cc2d0
add esp, 8
xor ebx, ebx
jmp 0x4777d8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4777c4
push 0
push ebp
call fcn.004cc2d0
add esp, 8
jmp 0x4777d8
test edi, edi
je 0x4777d8
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 0x4778ed
mov dword [esp + 0x10], ebx
mov edi, ebx
jmp 0x477750
push 0
push ebp
call fcn.004cc2d0
add esp, 8
test edi, edi
jne 0x477989
push 0xffffffffffffffff
lea eax, [esp + 0x20]
push 0xffffffffffffffff
push eax
call fcn.00476800
add esp, 0xc
test edx, edx
jl 0x477934
jg 0x47782e
test eax, eax
jb 0x477934
cmp dword [esi + 0x58], ebx
jl 0x47785e
lea ecx, [esp + 0x1c]
push ecx
call fcn.004caf30
mov ecx, dword [esi + 0x5c]
add esp, 4
cmp ecx, eax
je 0x477859
call fcn.004771f0
lea edx, [esp + 0x4c]
push edx
call fcn.004cb0a0
add esp, 4
cmp dword [esi + 0x58], ebx
jge 0x4778bd
lea eax, [esp + 0x1c]
push eax
call fcn.004caf30
mov edi, dword [esi + 0x34]
add esp, 4
xor ecx, ecx
test edi, edi
mov dword [esi + 0x5c], eax
jle 0x47788f
mov edx, dword [esi + 0x40]
lea ebx, [ebx]
cmp dword [edx], eax
je 0x47788f
mov ebx, dword [esi + 0x34]
inc ecx
add edx, 4
cmp ecx, ebx
jl 0x477880
cmp ecx, edi
je 0x477944
push eax
push ebp
mov dword [esi + 0x60], ecx
call fcn.004cc2b0
mov ecx, dword [esi + 0x5c]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.004cc2b0
mov edi, dword [esp + 0x20]
add esp, 0x10
mov dword [esi + 0x58], 3
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.004cbd90
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.004cbd90
lea eax, [esp + 0x2c]
push eax
call fcn.004cadc0
add esp, 0x14
mov dword [esp + 0x18], eax
jmp 0x477750
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 0x47790d
jl 0x477909
test edi, edi
jae 0x47790d
xor edi, edi
xor ecx, ecx
test edx, edx
jle 0x477923
add eax, 8
mov ebx, dword [eax]
add edi, ebx
mov ebx, dword [eax + 4]
adc ecx, ebx
add eax, 0x10
dec edx
jne 0x477914
mov eax, dword [esp + 0x14]
cdq
sub edi, eax
sbb ecx, edx
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], ecx
jmp 0x477992
push 0xffffffffffffffff
push esi
call fcn.00477620
add esp, 8
mov dword [esi + 0x54], edx
jmp 0x47798f
or eax, 0xffffffff
lea ecx, [esp + 0x4c]
push ecx
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
call fcn.004cb0a0
lea eax, [esi + 0x1e0]
push eax
call fcn.00479b00
lea edx, [esi + 0x250]
push edx
call fcn.004796b0
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.004cb0a0
fld qword [0x4dda70]
add esp, 4
fstp qword [esi + 0x68]
fld qword [0x4dda70]
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