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

Disassembly:
sub esp, 0x58
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov eax, edx
imul eax, ecx
push ebx
push esi
mov esi, dword [esp + 0x68]
push edi
lea edi, [eax + esi]
sar eax, 2
xor ebx, ebx
add eax, edi
cmp ecx, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], eax
jle 0x406472
mov dword [esp + 0x10], esi
lea esi, [esi + edx + 1]
mov dword [esp + 0x14], esi
lea esi, [ecx + ecx*2 - 3]
imul esi, edx
mov dword [esp + 0x18], esi
lea esi, [ecx - 2]
imul esi, edx
lea esi, [esi + esi*2]
lea eax, [edx*4]
sub eax, edx
mov dword [esp + 0x1c], esi
lea esi, [ecx - 1]
mov ecx, dword [esp + 0x68]
neg eax
add eax, eax
shr esi, 1
add esi, 1
mov dword [esp + 0x60], eax
mov dword [esp + 0x2c], esi
push ebp
jmp 0x406020
test edx, edx
jle 0x406451
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x78], ebp
mov ebp, dword [esp + 0x1c]
lea eax, [ecx + 4]
lea edx, [ecx + 5]
lea esi, [ecx + 3]
lea edi, [ecx + 2]
add ecx, 1
add ebp, ecx
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x70], ebp
mov ebp, dword [esp + 0x20]
add ebp, eax
mov dword [esp + 0x24], ebp
mov ebp, edx
sub ebp, eax
mov dword [esp + 0x50], ebp
mov ebp, esi
sub ebp, eax
mov dword [esp + 0x54], ebp
mov ebp, edi
sub ebp, eax
mov dword [esp + 0x58], ebp
mov ebp, ecx
sub ebp, eax
mov dword [esp + 0x5c], ebp
mov ebp, dword [esp + 0x6c]
sub ebp, eax
sub eax, ecx
sub edi, ecx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x6c]
add eax, 0xffffffff
sub edi, ecx
sub edx, ecx
sub esi, ecx
shr eax, 1
add eax, 1
mov dword [esp + 0x40], edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x4c], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x60], ebp
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x78]
movzx ecx, byte [ecx]
movzx eax, byte [edi + esi]
imul ecx, ecx, 0x12a
imul eax, eax, 0x199
lea ecx, [eax + ecx - 0xdea0]
sar ecx, 8
cmp ecx, 0xff
jle 0x4060f3
mov eax, 0xff
jmp 0x4060ff
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x10]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x78]
movzx ecx, byte [eax]
movzx eax, byte [edi + esi]
imul ecx, ecx, 0x12a
imul eax, eax, 0xd0
sub ecx, eax
movzx eax, byte [edx + ebx]
imul eax, eax, 0x64
sub ecx, eax
add ecx, 0x87e0
sar ecx, 8
cmp ecx, 0xff
jle 0x406144
mov eax, 0xff
jmp 0x406150
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov byte [ebp], al
mov eax, dword [esp + 0x78]
movzx eax, byte [eax]
movzx ecx, byte [edx + ebx]
imul eax, eax, 0x12a
imul ecx, ecx, 0x204
lea eax, [ecx + eax - 0x11420]
sar eax, 8
cmp eax, 0xff
jle 0x406182
mov ecx, 0xff
jmp 0x40618e
xor ecx, ecx
test eax, eax
setl cl
sub ecx, 1
and ecx, eax
mov eax, dword [esp + 0x40]
mov byte [eax + ebp], cl
mov ecx, dword [esp + 0x78]
movzx eax, byte [ecx + 1]
movzx ecx, byte [edi + esi]
imul eax, eax, 0x12a
imul ecx, ecx, 0x199
lea ecx, [eax + ecx - 0xdea0]
sar ecx, 8
cmp ecx, 0xff
jle 0x4061c6
mov eax, 0xff
jmp 0x4061d2
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x44]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x78]
movzx ecx, byte [eax + 1]
movzx eax, byte [edi + esi]
imul ecx, ecx, 0x12a
imul eax, eax, 0xd0
sub ecx, eax
movzx eax, byte [edx + ebx]
imul eax, eax, 0x64
sub ecx, eax
add ecx, 0x87e0
sar ecx, 8
cmp ecx, 0xff
jle 0x406214
mov eax, 0xff
jmp 0x406220
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x48]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x78]
movzx ecx, byte [eax + 1]
movzx eax, byte [edx + ebx]
imul ecx, ecx, 0x12a
imul eax, eax, 0x204
lea ecx, [ecx + eax - 0x11420]
sar ecx, 8
cmp ecx, 0xff
jle 0x406258
mov eax, 0xff
jmp 0x406264
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x4c]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x70]
movzx ecx, byte [eax]
movzx eax, byte [edi + esi]
imul ecx, ecx, 0x12a
imul eax, eax, 0x199
lea ecx, [ecx + eax - 0xdea0]
sar ecx, 8
cmp ecx, 0xff
jle 0x40629b
mov eax, 0xff
jmp 0x4062a7
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x50]
mov ebp, dword [esp + 0x24]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x70]
movzx ecx, byte [eax]
movzx eax, byte [edi + esi]
imul ecx, ecx, 0x12a
imul eax, eax, 0xd0
sub ecx, eax
movzx eax, byte [edx + ebx]
imul eax, eax, 0x64
sub ecx, eax
add ecx, 0x87e0
sar ecx, 8
cmp ecx, 0xff
jle 0x4062ec
mov eax, 0xff
jmp 0x4062f8
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x70]
mov byte [ebp], al
movzx eax, byte [ecx]
movzx ecx, byte [edx + ebx]
imul eax, eax, 0x12a
imul ecx, ecx, 0x204
lea eax, [eax + ecx - 0x11420]
sar eax, 8
cmp eax, 0xff
jle 0x40632a
mov ecx, 0xff
jmp 0x406336
xor ecx, ecx
test eax, eax
setl cl
sub ecx, 1
and ecx, eax
mov eax, dword [esp + 0x54]
mov byte [eax + ebp], cl
mov ecx, dword [esp + 0x70]
movzx eax, byte [ecx - 1]
movzx ecx, byte [edi + esi]
imul eax, eax, 0x12a
imul ecx, ecx, 0x199
lea ecx, [eax + ecx - 0xdea0]
sar ecx, 8
cmp ecx, 0xff
jle 0x40636e
mov eax, 0xff
jmp 0x40637a
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x58]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x70]
movzx ecx, byte [eax - 1]
movzx eax, byte [edi + esi]
imul ecx, ecx, 0x12a
imul eax, eax, 0xd0
sub ecx, eax
movzx eax, byte [edx + ebx]
imul eax, eax, 0x64
sub ecx, eax
add ecx, 0x87e0
sar ecx, 8
cmp ecx, 0xff
jle 0x4063bc
mov eax, 0xff
jmp 0x4063c8
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x5c]
mov byte [ecx + ebp], al
mov eax, dword [esp + 0x70]
movzx ecx, byte [eax - 1]
movzx eax, byte [edx + ebx]
imul ecx, ecx, 0x12a
imul eax, eax, 0x204
lea ecx, [ecx + eax - 0x11420]
sar ecx, 8
cmp ecx, 0xff
jle 0x406400
mov eax, 0xff
jmp 0x40640c
xor eax, eax
test ecx, ecx
setl al
sub eax, 1
and eax, ecx
mov ecx, dword [esp + 0x60]
add dword [esp + 0x10], 6
mov byte [ecx + ebp], al
mov eax, 2
add dword [esp + 0x78], eax
add dword [esp + 0x70], eax
add ebp, 6
add ebx, 1
add esi, 1
sub dword [esp + 0x28], 1
mov dword [esp + 0x24], ebp
jne 0x4060c3
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x30]
add dword [esp + 0x1c], eax
add dword [esp + 0x20], eax
lea edi, [edx + edx]
add dword [esp + 0x14], edi
add dword [esp + 0x18], edi
sub esi, 1
mov dword [esp + 0x30], esi
jne 0x406020
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x58
ret