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

Disassembly:
sub esp, 0x1b0
push ebp
push esi
mov esi, dword [esp + 0x1bc]
cmp dword [esi + 0x58], 2
jge 0x4afb28
mov eax, 0xffffff7d
jmp 0x4afe6e
cmp dword [esi + 4], 0
jne 0x4afb38
mov eax, 0xffffff76
jmp 0x4afe6e
push ebx
mov ebx, dword [esp + 0x1c8]
push edi
test ebx, ebx
jl 0x4afe67
mov edi, dword [esp + 0x1c8]
jg 0x4afb5a
test edi, edi
jb 0x4afe67
cmp ebx, dword [esi + 0x14]
jg 0x4afe67
jl 0x4afb6e
cmp edi, dword [esi + 0x10]
ja 0x4afe67
cmp dword [esi + 0x58], 3
jl 0x4afb9c
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 0x38]
cmp ebx, dword [ecx + eax*8 + 4]
jl 0x4afb95
jg 0x4afb87
cmp edi, dword [ecx + eax*8]
jb 0x4afb95
cmp ebx, dword [ecx + eax*8 + 0xc]
jl 0x4afb9c
jg 0x4afb95
cmp edi, dword [ecx + eax*8 + 8]
jb 0x4afb9c
push esi
call fcn.004ad93c
pop ecx
push dword [esi + 0x5c]
or dword [esi + 0x50], 0xffffffff
lea ebp, [esi + 0x78]
or dword [esi + 0x54], 0xffffffff
push ebp
call fcn.004c0630
lea eax, [esi + 0x1e0]
push eax
call fcn.004b1656
push ebx
push edi
push esi
call fcn.004aed3d
add esp, 0x18
test eax, eax
lea eax, [esp + 0x58]
je 0x4afbef
or dword [esi + 0x50], 0xffffffff
or dword [esi + 0x54], 0xffffffff
push eax
call fcn.004bfcd0
push esi
call fcn.004ad93c
pop ecx
pop ecx
mov eax, 0xffffff77
jmp 0x4afe6c
push dword [esi + 0x5c]
xor edi, edi
and dword [esp + 0x1c], edi
and dword [esp + 0x20], edi
and dword [esp + 0x18], edi
push eax
mov dword [esp + 0x18], edi
call fcn.004bffe0
lea eax, [esp + 0x60]
push eax
call fcn.004c05a0
add esp, 0xc
jmp 0x4afc1d
mov edi, dword [esp + 0x10]
cmp dword [esi + 0x58], 3
jl 0x4afcc4
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.004c0260
pop ecx
pop ecx
test eax, eax
jle 0x4afcc4
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x48]
shl ecx, 5
add eax, ecx
cmp dword [eax + 0x1c], 0
je 0x4afcba
lea ecx, [esp + 0x38]
push ecx
push eax
call fcn.004b16e4
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jns 0x4afc72
push 0
push ebp
call fcn.004c0260
pop ecx
pop ecx
xor ebx, ebx
jmp 0x4afc9a
cmp dword [esp + 0x1c], 0
je 0x4afc8c
cmp dword [esp + 0x14], 0
jne 0x4afc8c
push 0
push ebp
call fcn.004c0260
pop ecx
pop ecx
jmp 0x4afc9a
test edi, edi
je 0x4afc9a
lea eax, [ebx + edi]
sar eax, 2
add dword [esp + 0x18], eax
mov ecx, dword [esp + 0x48]
mov eax, ecx
mov edi, dword [esp + 0x4c]
and eax, edi
cmp eax, 0xffffffff
jne 0x4afde1
mov edi, ebx
mov dword [esp + 0x10], edi
jmp 0x4afc1d
push 0
push ebp
call fcn.004c0260
pop ecx
pop ecx
test edi, edi
jne 0x4afe48
push 0xffffffffffffffff
push 0xffffffffffffffff
lea eax, [esp + 0x30]
push eax
push esi
call fcn.004adf5d
mov ecx, edx
mov dword [esp + 0x34], eax
add esp, 0x10
mov dword [esp + 0x20], ecx
test ecx, ecx
jl 0x4afe36
jg 0x4afcfa
test eax, eax
jb 0x4afe36
cmp dword [esi + 0x58], 3
jl 0x4afd37
lea eax, [esp + 0x28]
push eax
call fcn.004bfca0
pop ecx
cmp dword [esi + 0x5c], eax
je 0x4afd31
lea eax, [esp + 0x28]
push eax
call fcn.004bfb70
pop ecx
test eax, eax
je 0x4afd31
push esi
call fcn.004ad93c
lea eax, [esp + 0x5c]
push eax
call fcn.004bfcd0
pop ecx
pop ecx
cmp dword [esi + 0x58], 3
jge 0x4afdb1
lea eax, [esp + 0x28]
push eax
call fcn.004bfca0
pop ecx
mov ecx, dword [esi + 0x34]
xor edi, edi
mov ebx, eax
test ecx, ecx
jle 0x4afd5c
mov eax, dword [esi + 0x40]
cmp dword [eax], ebx
je 0x4afd5c
inc edi
add eax, 4
cmp edi, ecx
jl 0x4afd50
cmp edi, ecx
je 0x4afc19
push ebx
push ebp
mov dword [esi + 0x60], edi
mov dword [esi + 0x5c], ebx
call fcn.004c0630
lea eax, [esp + 0x60]
push ebx
push eax
call fcn.004c0630
mov eax, dword [esi + 0x3c]
add esp, 0x10
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x58], 3
cmp ecx, dword [eax + edi*8 + 4]
jg 0x4afda8
jl 0x4afd9e
mov ecx, dword [esp + 0x24]
cmp ecx, dword [eax + edi*8]
ja 0x4afda8
mov dword [esp + 0x14], 1
jmp 0x4afdad
and dword [esp + 0x14], 0
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
push ebp
call fcn.004c02a0
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x64]
push eax
call fcn.004c02a0
lea eax, [esp + 0x38]
push eax
call fcn.004bfc00
add esp, 0x14
mov dword [esp + 0x1c], eax
jmp 0x4afc1d
mov ebx, dword [esi + 0x60]
mov eax, ebx
mov edx, dword [esi + 0x44]
shl eax, 4
sub ecx, dword [eax + edx]
sbb edi, dword [eax + edx + 4]
xor ebp, ebp
cmp edi, ebp
jg 0x4afe03
jl 0x4afdff
cmp ecx, ebp
jae 0x4afe03
mov ecx, ebp
mov edi, ebp
test ebx, ebx
jle 0x4afe15
add edx, 8
add ecx, dword [edx]
adc edi, dword [edx + 4]
lea edx, [edx + 0x10]
dec ebx
jne 0x4afe0a
mov eax, dword [esp + 0x18]
cdq
sub ecx, eax
mov dword [esi + 0x50], ecx
sbb edi, edx
mov dword [esi + 0x54], edi
cmp edi, ebp
jg 0x4afe50
jl 0x4afe2e
cmp ecx, ebp
jae 0x4afe50
mov dword [esi + 0x50], ebp
mov dword [esi + 0x54], ebp
jmp 0x4afe50
push 0xffffffffffffffff
push esi
call fcn.004afa9f
pop ecx
pop ecx
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
jmp 0x4afe50
or dword [esi + 0x50], 0xffffffff
or dword [esi + 0x54], 0xffffffff
lea eax, [esp + 0x58]
push eax
call fcn.004bfcd0
fldz
xor eax, eax
fst qword [esi + 0x68]
fstp qword [esi + 0x70]
pop ecx
jmp 0x4afe6c
mov eax, 0xffffff7d
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x1b0
ret