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

Disassembly:
sub esp, 0x1a4
push esi
mov esi, dword [esp + 0x1ac]
cmp dword [esi + 0x58], 2
jge 0x46ef31
mov eax, 0xffffff7d
pop esi
add esp, 0x1a4
ret
mov eax, dword [esi + 4]
test eax, eax
jne 0x46ef45
mov eax, 0xffffff76
pop esi
add esp, 0x1a4
ret
push ebx
mov ebx, dword [esp + 0x1b8]
test ebx, ebx
push edi
jl 0x46f23e
mov edi, dword [esp + 0x1b8]
jg 0x46ef67
test edi, edi
jb 0x46f23e
cmp ebx, dword [esi + 0x14]
jg 0x46f23e
jl 0x46ef7b
cmp edi, dword [esi + 0x10]
ja 0x46f23e
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.004c3a60
lea eax, [esi + 0x1e0]
push eax
call fcn.004715c0
push ebx
push edi
mov eax, esi
call fcn.0046e040
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.004c27c0
lea eax, [esp + 0x68]
push eax
call fcn.004c39c0
add esp, 0x20
lea esp, [esp]
mov eax, dword [esi + 0x58]
mov ebx, 3
cmp eax, ebx
jl 0x46f083
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.004c3a80
add esp, 8
test eax, eax
jle 0x46f083
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 0x46f078
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.00470d50
mov ebx, eax
add esp, 8
test ebx, ebx
jge 0x46f02f
push 0
push ebp
call fcn.004c3a80
add esp, 8
xor ebx, ebx
jmp 0x46f058
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46f044
push 0
push ebp
call fcn.004c3a80
add esp, 8
jmp 0x46f058
test edi, edi
je 0x46f058
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 0x46f16d
mov dword [esp + 0x10], ebx
mov edi, ebx
jmp 0x46efd0
push 0
push ebp
call fcn.004c3a80
add esp, 8
test edi, edi
jne 0x46f209
push 0xffffffffffffffff
lea eax, [esp + 0x20]
push 0xffffffffffffffff
push eax
call fcn.0046e080
add esp, 0xc
test edx, edx
jl 0x46f1b4
jg 0x46f0ae
test eax, eax
jb 0x46f1b4
cmp dword [esi + 0x58], ebx
jl 0x46f0de
lea ecx, [esp + 0x1c]
push ecx
call fcn.004c26e0
mov ecx, dword [esi + 0x5c]
add esp, 4
cmp ecx, eax
je 0x46f0d9
call fcn.0046ea70
lea edx, [esp + 0x4c]
push edx
call fcn.004c2850
add esp, 4
cmp dword [esi + 0x58], ebx
jge 0x46f13d
lea eax, [esp + 0x1c]
push eax
call fcn.004c26e0
mov edi, dword [esi + 0x34]
add esp, 4
xor ecx, ecx
test edi, edi
mov dword [esi + 0x5c], eax
jle 0x46f10f
mov edx, dword [esi + 0x40]
lea ebx, [ebx]
cmp dword [edx], eax
je 0x46f10f
mov ebx, dword [esi + 0x34]
inc ecx
add edx, 4
cmp ecx, ebx
jl 0x46f100
cmp ecx, edi
je 0x46f1c4
push eax
push ebp
mov dword [esi + 0x60], ecx
call fcn.004c3a60
mov ecx, dword [esi + 0x5c]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.004c3a60
mov edi, dword [esp + 0x20]
add esp, 0x10
mov dword [esi + 0x58], 3
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.004c3540
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x58]
push edx
call fcn.004c3540
lea eax, [esp + 0x2c]
push eax
call fcn.004c2570
add esp, 0x14
mov dword [esp + 0x18], eax
jmp 0x46efd0
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 0x46f18d
jl 0x46f189
test edi, edi
jae 0x46f18d
xor edi, edi
xor ecx, ecx
test edx, edx
jle 0x46f1a3
add eax, 8
mov ebx, dword [eax]
add edi, ebx
mov ebx, dword [eax + 4]
adc ecx, ebx
add eax, 0x10
dec edx
jne 0x46f194
mov eax, dword [esp + 0x14]
cdq
sub edi, eax
sbb ecx, edx
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], ecx
jmp 0x46f212
push 0xffffffffffffffff
push esi
call fcn.0046eea0
add esp, 8
mov dword [esi + 0x54], edx
jmp 0x46f20f
or eax, 0xffffffff
lea ecx, [esp + 0x4c]
push ecx
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
call fcn.004c2850
lea eax, [esi + 0x1e0]
push eax
call fcn.00471380
lea edx, [esi + 0x250]
push edx
call fcn.00470f30
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.004c2850
fld qword [0x4d3198]
add esp, 4
fstp qword [esi + 0x68]
fld qword [0x4d3198]
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