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

Disassembly:
sub esp, 0x34
push edi
mov edi, dword [eax + 8]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
test eax, eax
je 0x459938
mov ecx, dword [esp + 0x3c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4c]
mov eax, esi
imul eax, eax, 0xcc
lea eax, [eax + ecx + 4]
mov dword [esp + 0x24], eax
jmp 0x459646
mov eax, dword [esp + 0x24]
test byte [edi + 0x10], 8
mov edx, dword [eax + 0xc4]
mov ebx, dword [eax + 0xc8]
mov dword [esp + 0x14], edx
jne 0x459921
mov eax, dword [edi]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x18], eax
mov ebp, dword [esp + 0x18]
mov edx, dword [edi + 4]
add ebp, ebx
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x10], ebx
cmp esi, ecx
jne 0x4597f4
mov eax, dword [esp + 0x50]
cmp byte [eax + 0x78], cl
je 0x459806
cmp byte [eax + 0x7a], cl
jne 0x45981c
mov dword [esp + 0x28], ecx
xor eax, eax
mov dword [edi + 0xc], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
cmp esi, 1
jne 0x45972c
mov ecx, dword [edi]
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x38]
push eax
mov eax, dword [edi + 4]
push ecx
add eax, ecx
add esi, 0x19c
call fcn.00457b90
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x54]
mov eax, dword [esp + 0x44]
add esp, 8
mov edx, dword [esp + 0x38]
dec edx
je 0x4598bf
dec edx
je 0x4598c3
dec edx
je 0x4598b6
mov esi, dword [edi + 0x14]
test esi, esi
je 0x4597be
test byte [esi + 0x10], 8
jne 0x45976a
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
push ecx
push edx
push eax
push esi
call fcn.00459300
add esp, 0x10
mov ecx, dword [esi + 4]
mov edx, dword [edi + 4]
mov eax, dword [esi + 0xc]
sar edx, 1
sar ecx, 1
sub edx, ecx
sub edx, dword [esi]
sar eax, 1
add eax, dword [esi + 8]
add edx, dword [edi]
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], edx
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x20], eax
mov ebp, dword [esp + 0x20]
mov eax, ebx
sar eax, 1
sub ebp, eax
add ebp, dword [esp + 0x34]
mov ecx, dword [esp + 0x50]
mov dword [edi + 8], ebp
mov dword [edi + 0xc], ebx
cmp byte [ecx + 0x7c], 0
je 0x459876
cmp ebx, 0x40
jg 0x459862
cmp ebx, 0x20
jl 0x459829
sar ebx, 1
add ebp, ebx
and ebp, 0xffffffc0
mov dword [esp + 0x10], 0x40
jmp 0x459876
cmp esi, 1
jne 0x4596e7
mov eax, dword [esp + 0x50]
cmp byte [eax + 0x79], cl
jne 0x459811
mov dword [edi + 8], ebp
mov dword [edi + 0xc], ebx
jmp 0x45991d
mov edx, eax
cmp byte [edx + 0x7b], cl
je 0x4596e7
mov dword [esp + 0x28], 1
jmp 0x4596eb
test ebx, ebx
jle 0x45985a
lea esi, [ebx + ebp + 0x20]
and esi, 0xffffffc0
lea edx, [ebp + 0x20]
and edx, 0xffffffc0
mov eax, esi
sub eax, ebx
mov ecx, edx
sub eax, ebp
sub ecx, ebp
jns 0x459848
neg ecx
test eax, eax
jns 0x45984e
neg eax
cmp ecx, eax
jg 0x459856
mov ebp, edx
jmp 0x459876
mov ebp, esi
jmp 0x459876
add ebp, 0x20
and ebp, 0xffffffc0
jmp 0x459876
mov ecx, dword [esp + 0x24]
push 0
mov eax, ebx
call fcn.00456350
add esp, 4
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
lea ecx, [eax + ebp + 0x20]
and ecx, 0xffffffc0
sub ecx, eax
sub ecx, ebp
mov eax, ecx
cdq
mov ebx, eax
lea esi, [ebp + 0x20]
and esi, 0xffffffc0
xor ebx, edx
sub esi, ebp
sub ebx, edx
mov eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, ebx
jg 0x4598a3
mov ecx, esi
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
add ecx, ebp
mov dword [edi + 0xc], edx
jmp 0x4598c3
mov edx, eax
sub edx, ecx
mov dword [edi + 0xc], edx
jmp 0x4598c3
mov ecx, eax
sub ecx, ebx
cmp dword [esp + 0x28], 0
mov dword [edi + 8], ecx
je 0x45991d
mov edx, dword [edi + 0xc]
mov ebx, ecx
cmp edx, 0x40
jge 0x4598de
mov edx, 0x40
jmp 0x4598e4
add edx, 0x20
and edx, 0xffffffc0
mov ecx, dword [esp + 0x38]
dec ecx
je 0x459915
dec ecx
je 0x45991a
dec ecx
je 0x45991d
mov ecx, edx
sar ecx, 1
mov dword [edi + 0xc], edx
test dl, 0x40
je 0x45990a
lea eax, [ecx + ebx]
and eax, 0xffffffc0
add eax, 0x20
sub eax, ecx
jmp 0x459917
lea eax, [ecx + ebx + 0x20]
and eax, 0xffffffc0
sub eax, ecx
jmp 0x459917
sub eax, edx
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
or dword [edi + 0x10], 8
mov eax, dword [esp + 0x2c]
dec eax
add edi, 0x1c
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x459642
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x34
ret