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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x88
mov edx, dword [esp + 0xa4]
mov edi, dword [esp + 0xb0]
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
test edx, edx
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
je 0x408576
mov ebx, dword [esp + 0xa0]
xor eax, eax
movzx ecx, word [ebx + eax*2]
add eax, 1
add word [esp + ecx*2 + 0x48], 1
cmp eax, edx
jne 0x408565
mov esi, dword [esp + 0xac]
mov eax, dword [esi]
movzx esi, word [esp + 0x66]
test si, si
jne 0x408d39
cmp word [esp + 0x64], 0
jne 0x408d2c
cmp word [esp + 0x62], 0
jne 0x408c55
cmp word [esp + 0x60], 0
jne 0x408d60
cmp word [esp + 0x5e], 0
jne 0x408d53
cmp word [esp + 0x5c], 0
jne 0x408d46
cmp word [esp + 0x5a], 0
jne 0x408d7a
cmp word [esp + 0x58], 0
jne 0x408d6d
cmp word [esp + 0x56], 0
jne 0x408da1
cmp word [esp + 0x54], 0
jne 0x408d94
cmp word [esp + 0x52], 0
jne 0x408d87
cmp word [esp + 0x50], 0
jne 0x408dae
cmp word [esp + 0x4e], 0
jne 0x408dc8
cmp word [esp + 0x4c], 0
jne 0x408dbb
cmp word [esp + 0x4a], 0
jne 0x408676
mov ebp, dword [esp + 0xa8]
mov eax, dword [ebp]
mov byte [eax], 0x40
mov byte [eax + 1], 1
mov word [eax + 2], 0
mov byte [eax + 4], 0x40
mov byte [eax + 5], 1
mov word [eax + 6], 0
add eax, 8
mov dword [ebp], eax
mov eax, dword [esp + 0xac]
mov dword [eax], 1
xor eax, eax
add esp, 0x88
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ebp, word [esp + 0x4a]
mov dword [esp + 0x24], 1
mov word [esp + 0xc], bp
mov ebp, 1
cmp dword [esp + 0x24], eax
mov ebx, 2
cmovbe eax, dword [esp + 0x24]
movzx ecx, word [esp + 0xc]
cmp eax, ebp
cmovb eax, ebp
sub ebx, ecx
mov dword [esp + 0x20], eax
mov eax, 0xffffffff
js 0x40866b
movzx ecx, word [esp + 0x4c]
add ebx, ebx
mov eax, 0xffffffff
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x4e]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x50]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x52]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x54]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x56]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x58]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x5a]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x5c]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x5e]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x60]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x62]
add ebx, ebx
sub ebx, ecx
js 0x40866b
movzx ecx, word [esp + 0x64]
add ebx, ebx
sub ebx, ecx
js 0x40866b
add ebx, ebx
movzx ecx, si
sub ebx, ecx
cmp ebx, 0
jl 0x40866b
je 0x408796
cmp dword [esp + 0x24], 1
jne 0x408e2f
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x408e2f
movzx esi, word [esp + 0xc]
mov word [esp + 0x6a], 0
mov eax, esi
add ax, word [esp + 0x4c]
mov word [esp + 0x6c], si
mov word [esp + 0x6e], ax
add ax, word [esp + 0x4e]
mov word [esp + 0x70], ax
add ax, word [esp + 0x50]
mov word [esp + 0x72], ax
add ax, word [esp + 0x52]
mov word [esp + 0x74], ax
add ax, word [esp + 0x54]
mov word [esp + 0x76], ax
add ax, word [esp + 0x56]
mov word [esp + 0x78], ax
add ax, word [esp + 0x58]
mov word [esp + 0x7a], ax
add ax, word [esp + 0x5a]
mov word [esp + 0x7c], ax
add ax, word [esp + 0x5c]
mov word [esp + 0x7e], ax
add ax, word [esp + 0x5e]
mov word [esp + 0x80], ax
add ax, word [esp + 0x60]
mov word [esp + 0x82], ax
add ax, word [esp + 0x62]
mov word [esp + 0x84], ax
add ax, word [esp + 0x64]
test edx, edx
mov word [esp + 0x86], ax
je 0x408873
mov esi, dword [esp + 0xa0]
xor eax, eax
mov dword [esp + 0xc], ebp
movzx ecx, word [esi + eax*2]
test cx, cx
je 0x408868
movzx ecx, cx
movzx ebx, word [esp + ecx*2 + 0x68]
movzx ebp, bx
add ebx, 1
mov word [edi + ebp*2], ax
mov word [esp + ecx*2 + 0x68], bx
add eax, 1
cmp eax, edx
jne 0x408848
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x9c]
test eax, eax
jne 0x408b07
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x30], 0x13
movzx ecx, byte [esp + 0x20]
mov dword [esp + 0x28], 1
mov eax, dword [esp + 0xa8]
shl dword [esp + 0x28], cl
mov esi, dword [esp + 0x28]
mov eax, dword [eax]
sub esi, 1
cmp dword [esp + 0x9c], 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], esi
sete byte [esp + 0x47]
cmp dword [esp + 0x28], 0x5af
ja 0x408b56
mov edx, dword [esp + 0x20]
xor ebx, ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x34], 0xffffffff
mov dword [esp + 0x14], 0
movzx eax, byte [esp + 0x10]
xor edi, edi
sub al, byte [esp + 0x14]
mov ebp, eax
mov eax, dword [esp + 0x18]
movzx esi, word [eax]
movzx eax, si
cmp dword [esp + 0x30], eax
jg 0x40892d
mov esi, 0
mov edi, 0x60
jge 0x40892d
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
movzx edi, byte [esi + eax*2]
movzx esi, word [ecx + eax*2]
mov ecx, dword [esp + 0x10]
mov eax, 1
sub ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], edx
shl eax, cl
mov ecx, edx
mov dword [esp + 8], eax
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 8]
mov dword [esp + 4], eax
mov eax, ebx
neg ecx
shl ecx, 2
mov dword [esp + 0xc], ecx
movzx ecx, byte [esp + 0x14]
shr eax, cl
mov ecx, dword [esp + 4]
add ecx, eax
mov eax, dword [esp + 0x1c]
sub ecx, dword [esp + 8]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 4]
mov dword [esp], ecx
mov ecx, edi
mov edi, edx
mov byte [esp + 0x46], cl
mov edx, ebp
mov ecx, dword [esp]
mov ebp, ebx
movzx ebx, byte [esp + 0x46]
mov byte [ecx], bl
mov byte [ecx + 1], dl
mov word [ecx + 2], si
add ecx, dword [esp + 0xc]
sub eax, dword [esp + 8]
jne 0x408993
mov ecx, dword [esp + 0x10]
mov esi, 1
mov ebx, ebp
mov ebp, edx
mov edx, edi
sub ecx, 1
shl esi, cl
test esi, ebx
je 0x4089c6
nop
shr esi, 1
test esi, ebx
jne 0x4089c0
test esi, esi
je 0x408b00
lea eax, [esi - 1]
and eax, ebx
lea ebx, [eax + esi]
mov esi, dword [esp + 0x10]
movzx eax, word [esp + esi*2 + 0x48]
sub eax, 1
test ax, ax
mov word [esp + esi*2 + 0x48], ax
jne 0x408a0f
mov eax, dword [esp + 0x24]
cmp esi, eax
je 0x408b6b
mov esi, dword [esp + 0x18]
movzx eax, word [esi + 2]
mov esi, dword [esp + 0xa0]
movzx eax, word [esi + eax*2]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x10], ecx
jbe 0x408af2
mov edi, dword [esp + 0x38]
and edi, ebx
cmp edi, dword [esp + 0x34]
je 0x408af2
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x24]
test eax, eax
cmovne ecx, dword [esp + 0x14]
sub edx, ecx
cmp dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
jae 0x408a92
mov esi, dword [esp + 0x10]
mov ecx, edx
mov eax, 1
shl eax, cl
movzx ecx, word [esp + esi*2 + 0x48]
sub eax, ecx
test eax, eax
jle 0x408a92
mov ecx, dword [esp + 0x14]
mov dword [esp + 8], ebx
mov ebp, dword [esp + 0x24]
lea esi, [esp + ecx*2 + 0x48]
mov ebx, ecx
jmp 0x408a84
movzx ecx, word [esi + edx*2]
add eax, eax
sub eax, ecx
test eax, eax
jle 0x408a8e
add edx, 1
lea ecx, [edx + ebx]
cmp ebp, ecx
ja 0x408a78
mov ebx, dword [esp + 8]
mov eax, 1
mov ecx, edx
shl eax, cl
add dword [esp + 0x28], eax
cmp dword [esp + 0x28], 0x5af
ja 0x408c40
mov ebp, dword [esp + 0xa8]
mov eax, 4
movzx ecx, byte [esp + 0x2c]
lea esi, [edi*4]
mov dword [esp + 0x34], edi
shl eax, cl
movzx ecx, byte [esp + 0x20]
add dword [esp + 0x1c], eax
mov eax, dword [ebp]
mov byte [eax + edi*4], dl
mov eax, dword [ebp]
mov byte [eax + esi + 1], cl
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp]
sub eax, ecx
sar eax, 2
mov word [ecx + esi + 2], ax
add dword [esp + 0x18], 2
jmp 0x4088f4
xor ebx, ebx
jmp 0x4089d6
cmp dword [esp + 0x9c], 1
mov eax, 0x100
mov dword [esp + 0x30], 0xffffffff
cmovne eax, dword [esp + 0x30]
mov dword [esp + 0x40], 0x4167a0
mov dword [esp + 0x3c], 0x416720
mov dword [esp + 0x30], eax
mov eax, 0x41655e
cmovne eax, dword [esp + 0x40]
mov dword [esp + 0x40], eax
mov eax, 0x4164de
cmovne eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
jmp 0x408892
cmp byte [esp + 0x47], 0
mov eax, 1
je 0x4088d6
jmp 0x40866b
test ebx, ebx
mov eax, ecx
je 0x408bf6
movzx edi, byte [esp + 0x20]
mov esi, 1
mov edx, ebp
mov ebp, dword [esp + 0x14]
xor ecx, ecx
test ebp, ebp
je 0x408bba
mov ebp, dword [esp + 0x38]
and ebp, ebx
cmp ebp, dword [esp + 0x34]
je 0x408c37
mov ebp, dword [esp + 0xa8]
mov edx, edi
mov dword [esp + 0x14], 0
mov ebp, dword [ebp]
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x20]
lea eax, [ebp - 1]
mov ebp, ebx
shr ebp, cl
mov ecx, ebp
mov ebp, dword [esp + 0x1c]
lea ecx, [ebp + ecx*4]
mov ebp, esi
mov byte [ecx], 0x40
mov byte [ecx + 1], dl
mov word [ecx + 2], 0
mov ecx, eax
shl ebp, cl
test ebp, ebx
mov dword [esp + 8], ebp
je 0x408bee
mov ecx, ebp
shr ecx, 1
test ecx, ebx
jne 0x408be4
mov dword [esp + 8], ecx
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x408c20
mov esi, dword [esp + 0xac]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0xa8]
mov ecx, dword [esp + 0x20]
shl eax, 2
add dword [edx], eax
xor eax, eax
mov dword [esi], ecx
add esp, 0x88
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [esp + 8]
sub ebp, 1
and ebp, ebx
mov ebx, dword [esp + 8]
add ebx, ebp
jne 0x408b81
jmp 0x408bf6
mov ecx, dword [esp + 0x14]
jmp 0x408bba
cmp byte [esp + 0x47], 0
je 0x408aad
mov eax, 1
jmp 0x40866b
mov dword [esp + 0x24], 0xd
movzx ecx, word [esp + 0x4a]
test cx, cx
mov word [esp + 0xc], cx
jne 0x408688
cmp word [esp + 0x4c], 0
jne 0x408de9
cmp word [esp + 0x4e], 0
jne 0x408ddf
cmp word [esp + 0x50], 0
jne 0x408dd5
cmp word [esp + 0x52], 0
jne 0x408e39
cmp word [esp + 0x54], 0
jne 0x408e61
cmp word [esp + 0x56], 0
jne 0x408e57
cmp word [esp + 0x58], 0
jne 0x408e4d
cmp word [esp + 0x5a], 0
jne 0x408e43
cmp word [esp + 0x5c], 0
jne 0x408e11
cmp word [esp + 0x5e], 0
jne 0x408e07
cmp word [esp + 0x60], 0
jne 0x408dfd
cmp word [esp + 0x62], 0
jne 0x408df3
cmp word [esp + 0x64], 0
jne 0x408e25
test si, si
jne 0x408e1b
mov ebx, 2
mov ebp, 0x10
mov dword [esp + 0x20], 0x10
jmp 0x4086b2
mov dword [esp + 0x24], 0xe
jmp 0x408c5d
mov dword [esp + 0x24], 0xf
jmp 0x408c5d
mov dword [esp + 0x24], 0xa
jmp 0x408c5d
mov dword [esp + 0x24], 0xb
jmp 0x408c5d
mov dword [esp + 0x24], 0xc
jmp 0x408c5d
mov dword [esp + 0x24], 8
jmp 0x408c5d
mov dword [esp + 0x24], 9
jmp 0x408c5d
mov dword [esp + 0x24], 5
jmp 0x408c5d
mov dword [esp + 0x24], 6
jmp 0x408c5d
mov dword [esp + 0x24], 7
jmp 0x408c5d
mov dword [esp + 0x24], 4
jmp 0x408c5d
mov dword [esp + 0x24], 2
jmp 0x408c5d
mov dword [esp + 0x24], 3
jmp 0x408c5d
mov ebp, 4
jmp 0x40868d
mov ebp, 3
jmp 0x40868d
mov ebp, 2
jmp 0x40868d
mov ebp, 0xd
jmp 0x40868d
mov ebp, 0xc
jmp 0x40868d
mov ebp, 0xb
jmp 0x40868d
mov ebp, 0xa
jmp 0x40868d
mov ebp, 0xf
jmp 0x40868d
mov ebp, 0xe
jmp 0x40868d
mov eax, 0xffffffff
jmp 0x40866b
mov ebp, 5
jmp 0x40868d
mov ebp, 9
jmp 0x40868d
mov ebp, 8
jmp 0x40868d
mov ebp, 7
jmp 0x40868d
mov ebp, 6
jmp 0x40868d