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

Disassembly:
sub esp, 0x70
cmp dword [esp + 0x80], 0
push ebx
push ebp
mov ebp, dword [esp + 0x8c]
push esi
push edi
je 0x41674d
test ebp, ebp
je 0x41674d
cmp dword [esp + 0x98], 0
je 0x41674d
cmp dword [esp + 0xa0], 2
jl 0x41674d
mov esi, dword [esp + 0xa4]
cmp esi, 5
jl 0x41674d
mov ebx, dword [eax]
mov edi, dword [eax + 4]
xor ecx, ecx
cmp ecx, 5
jne 0x416546
mov eax, dword [esp + 0xa0]
dec eax
jmp 0x416560
mov edx, ecx
imul edx, dword [esp + 0xa0]
mov eax, 0x66666667
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ebx
mov dword [esp + ecx*4 + 0x48], eax
cmp ecx, 5
jne 0x416570
lea eax, [esi - 1]
jmp 0x416585
mov edx, ecx
imul edx, esi
mov eax, 0x66666667
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [edi + eax]
mov dword [esp + ecx*4 + 0x30], edx
inc ecx
cmp ecx, 5
jle 0x41653a
lea ecx, [esp + 0x30]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], 5
jmp 0x4165a8
mov ecx, dword [esp + 0x14]
mov edi, dword [ecx + 4]
mov eax, dword [ecx]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], eax
lea ebx, [esp + 0x48]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], 5
xor eax, eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x18], eax
cmp edi, dword [esp + 0x28]
jl 0x416640
mov edx, edi
imul edx, edx, 0x64
add edx, dword [esp + 0x88]
mov esi, edi
sub esi, dword [ecx]
inc esi
lea esp, [esp]
mov ecx, dword [ebx + 4]
cmp ecx, dword [ebx]
jl 0x41662f
mov edi, dword [ebx]
mov ebp, dword [esp + 0x94]
mov eax, ecx
sub eax, edi
lea eax, [eax + ebp + 1]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x18]
cmp byte [edx + ecx], 0
jne 0x41661e
add eax, 0xff
dec ecx
cmp ecx, edi
jge 0x416613
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
sub edx, 0x64
dec esi
jne 0x4165f0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0xa4]
cdq
idiv dword [esp + 0x94]
add ebp, 4
add ebx, 4
mov dword [esp + 0x1c], ebp
add dword [ebp - 4], eax
dec dword [esp + 0x20]
jne 0x4165c5
add ecx, 4
dec dword [esp + 0x24]
mov dword [esp + 0x14], ecx
jne 0x4165a4
mov eax, dword [esp + 0xa0]
imul eax, eax, 0x64
cdq
idiv esi
mov ecx, dword [esp + 0x90]
inc dword [ecx + 4]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x60], 0
add dword [ecx], eax
xor eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov eax, 0x64
mov ecx, eax
push ecx
mov ecx, dword [esp + 0xa0]
push eax
mov eax, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x9c]
push ecx
push edx
push eax
push 0
lea ecx, [esp + 0x84]
push ecx
call fcn.00416760
test al, al
je 0x41674d
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x98]
cmp dword [ecx + 4], eax
jge 0x416708
mov edx, dword [esp + 0x60]
mov dword [ecx + 4], eax
mov dword [ecx], edx
mov eax, dword [esp + 0x6c]
cmp dword [ecx + 0xc], eax
jge 0x41671b
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x68]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x74]
cmp dword [ecx + 0x14], eax
jge 0x41672e
mov edx, dword [esp + 0x70]
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x10], edx
mov eax, dword [esp + 0x7c]
cmp dword [ecx + 0x1c], eax
jge 0x416741
mov dword [ecx + 0x1c], eax
mov eax, dword [esp + 0x78]
mov dword [ecx + 0x18], eax
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0x24
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x70
ret 0x24