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

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
push edi
push eax
or ecx, 0xffffffff
mov edx, dword [esi]
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x30]
not ecx
dec ecx
add ecx, edx
push ecx
push edx
lea ecx, [edi + 0x4c]
call fcn.00412190
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0x54]
sub ecx, edx
mov eax, 0xaaaaaaab
sar ecx, 2
mul ecx
mov ecx, dword [esi + 0x40]
mov ebx, edx
mov edx, dword [esi + 0x3c]
mov eax, 0x2aaaaaab
sub ecx, edx
lea ebp, [edi + 0x2c]
imul ecx
sar edx, 1
mov eax, edx
xor ecx, ecx
shr eax, 0x1f
add edx, eax
shr ebx, 1
cmp ecx, edx
mov edx, dword [edi + 0x3c]
sbb eax, eax
mov ecx, dword [edx + 0x158]
neg eax
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
cmp ebx, eax
mov dword [esp + 0x28], ecx
jne 0x416843
test ebx, ebx
jne 0x416888
mov edx, dword [ebp + 4]
test edx, edx
je 0x416857
push eax
push ecx
mov ecx, ebp
call fcn.00436600
mov ecx, dword [esp + 0x28]
test ebx, ebx
mov dword [ebp + 8], ebx
jbe 0x416888
push 0
push ebx
push 0
push ecx
call fcn.00420760
add esp, 0x10
mov dword [ebp + 4], eax
test eax, eax
jne 0x416888
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
mov dword [eax], 3
pop ebx
add esp, 0x10
ret
xor ecx, ecx
cmp ebx, ecx
mov dword [esp + 0x2c], ecx
jle 0x416942
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
mov edx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x54]
mov ebx, dword [edi + 0x30]
mov ebp, dword [esp + 0x10]
mov dx, word [edx + ecx*4]
mov word [ebx + ebp], dx
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x416907
mov edx, dword [esi + 0x60]
mov ebx, dword [esp + 0x28]
mov ebp, dword [edi + 0x30]
add ebx, eax
mov ecx, dword [edx + ecx*4]
mov edx, dword [esi + 0x3c]
lea ecx, [ecx + ecx*2]
mov ecx, dword [edx + ecx*4]
mov dword [ebp + ebx*8 + 8], ecx
mov edx, dword [esi + 0x60]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov ebp, dword [edi + 0x30]
add ebx, eax
mov ecx, dword [edx + ecx*4]
lea edx, [ecx + ecx*2]
mov ecx, dword [esi + 0x3c]
mov edx, dword [ecx + edx*4 + 4]
mov ecx, dword [esp + 0x2c]
mov dword [ebp + ebx*8 + 0xc], edx
mov ebx, dword [esp + 0x10]
inc ecx
inc eax
add ebx, 2
cmp eax, 3
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x10], ebx
jl 0x4168ac
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
add ebx, 0x68
add edx, 0xd
dec eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], eax
jne 0x4168a2
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
sub ecx, edx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, dword [esi + 0x34]
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x2aaaaaab
mov ebp, edx
mov edx, dword [esi + 0x30]
sub ecx, edx
mov byte [esp + 0x28], 0
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp edx, ebp
mov dword [esp + 0x14], edx
jne 0x416986
mov byte [esp + 0x28], 1
mov edx, dword [edi + 0x3c]
mov ecx, dword [edi + 0x24]
lea ebx, [edi + 0x1c]
cmp ebp, ecx
mov eax, dword [edx + 0x158]
mov dword [esp + 0x2c], eax
jne 0x4169a1
test ebp, ebp
jne 0x4169ee
mov edx, dword [ebx + 4]
test edx, edx
je 0x4169be
push ecx
push edx
push eax
call fcn.00437b90
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [ebx + 4], 0
test ebp, ebp
mov dword [ebx + 8], ebp
jbe 0x4169ee
push 0
push eax
push ebp
mov ecx, ebx
call fcn.0041f630
test eax, eax
mov dword [ebx + 4], eax
jne 0x4169ec
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
mov dword [eax], 3
pop ebx
add esp, 0x10
ret
test ebp, ebp
jle 0x416a61
xor edx, edx
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], eax
jmp 0x416a02
xor ecx, ecx
mov ebx, dword [edi + 0x20]
mov word [eax + ebx + 4], cx
add eax, ebx
mov word [eax + 6], cx
mov ebx, dword [esi + 0x24]
mov ecx, edx
add ecx, ebx
mov ebx, dword [ecx]
mov dword [eax + 8], ebx
mov ebx, dword [ecx + 4]
mov dword [eax + 0xc], ebx
mov ecx, dword [ecx + 8]
mov dword [eax + 0x10], ecx
mov cl, byte [esp + 0x28]
test cl, cl
je 0x416a48
mov ebx, dword [esi + 0x30]
mov ecx, edx
add ecx, ebx
mov ebx, dword [ecx]
mov dword [eax + 0x14], ebx
mov ebx, dword [ecx + 4]
mov dword [eax + 0x18], ebx
mov ecx, dword [ecx + 8]
mov dword [eax + 0x1c], ecx
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
add eax, 0x20
add edx, 0xc
dec ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ecx
jne 0x416a00
mov al, byte [esp + 0x28]
test al, al
jne 0x416ac4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x416acc
mov byte [0x4644a4], 1
mov edx, dword [esi + 0x7c]
sub edx, dword [esi + 0x78]
sar edx, 2
je 0x416ac4
xor edx, edx
test ebp, ebp
jle 0x416ac4
xor ebx, ebx
mov eax, dword [esi + 0x78]
inc edx
mov eax, dword [eax + edx*4 - 4]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x30]
lea ecx, [eax + ecx*4]
mov eax, dword [edi + 0x20]
fld dword [ebx + eax + 0x14]
fadd dword [ecx]
lea eax, [ebx + eax + 0x14]
add ebx, 0x20
cmp edx, ebp
fstp dword [eax]
fld dword [ecx + 4]
fadd dword [eax + 4]
fstp dword [eax + 4]
fld dword [ecx + 8]
fadd dword [eax + 8]
fstp dword [eax + 8]
jl 0x416a8b
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x416ad3
mov byte [0x4644a4], 1
mov esi, dword [esi + 0x90]
mov edx, 4
mov ecx, dword [esi + 0x10]
lea eax, [esi + 0x14]
mov dword [edi], ecx
lea ecx, [edi + 4]
mov ebx, dword [eax]
add eax, 4
mov dword [ecx], ebx
add ecx, 4
dec edx
jne 0x416ae9
mov edx, dword [esi + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [edi + 0x14], edx
mov al, byte [esi + 0x28]
mov byte [edi + 0x18], al
pop edi
pop esi
pop ebp
mov dword [ecx], 0
pop ebx
add esp, 0x10
ret