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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffee8
mov dword [esp], edx
mov ebx, eax
mov eax, dword [esp]
cmp eax, 7
ja case.0x408bc3.0
jmp dword [eax*4 + 0x408bca]
mov edx, dword [ebx + 0xc]
mov dword [esp + 4], edx
mov ecx, dword [ebx + 0x20]
mov dword [esp + 8], ecx
mov eax, dword [ebx + 0x28]
mov dword [esp + 0xc], eax
cmp dword [esp + 8], 0x3c000
jge case.0x408bc3.0
mov dword [esp + 0x10], 0x1000000
cmp dword [esp], 2
jne 0x408c1f
mov dl, 0xe9
jmp 0x408c21
mov dl, 0xe8
mov byte [esp + 0x14], dl
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x408cac
mov ecx, dword [esp + 4]
inc dword [esp + 4]
mov al, byte [ecx]
mov byte [esp + 0x1c], al
inc dword [esp + 0x18]
cmp byte [esp + 0x1c], 0xe8
je 0x408c50
mov dl, byte [esp + 0x1c]
cmp dl, byte [esp + 0x14]
jne 0x408cac
mov ecx, dword [esp + 0x18]
add ecx, dword [esp + 0xc]
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 4]
mov edx, dword [eax]
mov dword [esp + 0x24], edx
cmp dword [esp + 0x24], 0
jge 0x408c8a
mov ecx, dword [esp + 0x24]
add ecx, dword [esp + 0x20]
test ecx, ecx
jl 0x408ca2
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x24]
add eax, 0x1000000
mov dword [edx], eax
jmp 0x408ca2
cmp dword [esp + 0x24], 0x1000000
jge 0x408ca2
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 4]
sub ecx, dword [esp + 0x20]
mov dword [eax], ecx
add dword [esp + 4], 4
add dword [esp + 0x18], 4
mov edx, dword [esp + 8]
add edx, 0xfffffffc
cmp edx, dword [esp + 0x18]
ja 0x408c2d
jmp case.0x408bc3.0
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x28], ecx
mov eax, dword [ebx + 0x20]
mov dword [esp + 0x2c], eax
mov edx, dword [ebx + 0x28]
mov dword [esp + 0x30], edx
cmp dword [esp + 0x2c], 0x3c000
jge case.0x408bc3.0
xor ecx, ecx
mov dword [esp + 0x34], ecx
shr dword [esp + 0x30], 4
jmp 0x408dc9
mov eax, dword [esp + 0x28]
xor edx, edx
mov dl, byte [eax]
and edx, 0x1f
add edx, 0xfffffff0
mov dword [esp + 0x38], edx
cmp dword [esp + 0x38], 0
jl 0x408dbb
mov ecx, dword [esp + 0x38]
mov al, byte [ecx + 0x4116b0]
mov byte [esp + 0x3c], al
cmp byte [esp + 0x3c], 0
je 0x408dbb
xor edx, edx
mov dword [esp + 0x40], edx
mov ecx, dword [esp + 0x40]
mov eax, 1
shl eax, cl
xor edx, edx
mov dl, byte [esp + 0x3c]
and eax, edx
je 0x408dac
imul ecx, dword [esp + 0x40], 0x29
add ecx, 5
mov eax, ebx
mov dword [esp + 0x44], ecx
push 4
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
add ecx, 0x25
call fcn.00409480
mov dword [esp + 0x48], eax
cmp dword [esp + 0x48], 5
jne 0x408dac
push 0x14
mov eax, ebx
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x2c]
add ecx, 0xd
call fcn.00409480
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x44]
add eax, 0xd
push eax
push 0x14
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x30]
sub ecx, dword [esp + 0x38]
mov eax, ebx
and ecx, 0xfffff
call fcn.004094d8
inc dword [esp + 0x40]
cmp dword [esp + 0x40], 2
jle 0x408d31
add dword [esp + 0x28], 0x10
add dword [esp + 0x34], 0x10
inc dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
add edx, 0xffffffeb
cmp edx, dword [esp + 0x34]
ja 0x408cf5
jmp case.0x408bc3.0
mov ecx, dword [ebx + 0x20]
xor edx, edx
mov dword [esp + 0x50], ecx
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], edx
mov ecx, dword [esp + 0x50]
add ecx, ecx
mov dword [esp + 0x5c], ecx
mov eax, dword [ebx + 0xc]
mov edx, dword [esp + 0x50]
mov dword [eax + 0x3c020], edx
cmp dword [esp + 0x50], 0x1e000
jge case.0x408bc3.0
xor ecx, ecx
mov dword [esp + 0x60], ecx
mov eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x54]
jge case.0x408bc3.0
xor edx, edx
mov eax, dword [esp + 0x50]
add eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x5c]
jge 0x408e5a
mov ecx, dword [esp + 0x58]
inc dword [esp + 0x58]
mov esi, dword [ebx + 0xc]
sub dl, byte [esi + ecx]
mov ecx, dword [ebx + 0xc]
mov byte [ecx + eax], dl
add eax, dword [esp + 0x54]
cmp eax, dword [esp + 0x5c]
jl 0x408e3c
inc dword [esp + 0x60]
mov eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x54]
jl 0x408e2c
jmp case.0x408bc3.0
mov edx, dword [ebx + 0x20]
mov dword [esp + 0x64], edx
mov eax, dword [ebx + 0x10]
sub eax, 3
mov dword [esp + 0x68], eax
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x6c], edx
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x70], ecx
mov eax, dword [esp + 0x70]
add eax, dword [esp + 0x64]
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], 3
mov edx, dword [ebx + 0xc]
mov ecx, dword [esp + 0x64]
mov dword [edx + 0x3c020], ecx
cmp dword [esp + 0x64], 0x1e000
jge case.0x408bc3.0
xor eax, eax
mov dword [esp + 0x7c], eax
xor ebx, ebx
mov edi, dword [esp + 0x7c]
cmp edi, dword [esp + 0x64]
jge 0x408f97
mov eax, edi
sub eax, dword [esp + 0x68]
cmp eax, 3
jl 0x408f6f
add eax, dword [esp + 0x74]
movzx esi, byte [eax]
movzx ebp, byte [eax - 3]
lea ecx, [esi + ebx]
sub ecx, ebp
mov eax, ecx
sub eax, ebx
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x84]
cdq
xor eax, edx
sub eax, edx
mov dword [esp + 0x80], eax
mov eax, ecx
sub eax, esi
sub ecx, ebp
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x8c]
cdq
xor eax, edx
sub eax, edx
mov dword [esp + 0x88], eax
mov dword [esp + 0x90], ecx
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x80]
cdq
xor eax, edx
sub eax, edx
cmp ecx, dword [esp + 0x88]
jg 0x408f5e
cmp eax, dword [esp + 0x80]
jl 0x408f5e
mov ecx, ebx
jmp 0x408f71
cmp eax, dword [esp + 0x88]
jl 0x408f6b
mov ecx, esi
jmp 0x408f71
mov ecx, ebp
jmp 0x408f71
mov ecx, ebx
mov eax, dword [esp + 0x70]
mov ebx, ecx
sub bl, byte [eax]
mov eax, dword [esp + 0x74]
and ebx, 0xff
mov byte [eax + edi], bl
inc dword [esp + 0x70]
add edi, 3
cmp edi, dword [esp + 0x64]
jl 0x408ed1
inc dword [esp + 0x7c]
cmp dword [esp + 0x7c], 3
jl 0x408ec1
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x94], edx
mov ecx, dword [esp + 0x64]
add ecx, 0xfffffffe
mov dword [esp + 0x98], ecx
mov eax, dword [esp + 0x94]
cmp eax, dword [esp + 0x98]
jge case.0x408bc3.0
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x94]
mov al, byte [edx + ecx + 1]
mov byte [esp + 0x9c], al
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x94]
mov al, byte [esp + 0x9c]
add byte [edx + ecx], al
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x94]
mov al, byte [esp + 0x9c]
add byte [edx + ecx + 2], al
add dword [esp + 0x94], 3
mov edx, dword [esp + 0x94]
cmp edx, dword [esp + 0x98]
jl 0x408fd3
jmp case.0x408bc3.0
mov ecx, dword [ebx + 0x20]
mov dword [esp + 0xa0], ecx
mov eax, dword [ebx + 0x10]
mov dword [esp + 0xa4], eax
mov edx, dword [ebx + 0xc]
mov dword [esp + 0xa8], edx
mov ecx, dword [esp + 0xa8]
add ecx, dword [esp + 0xa0]
mov dword [esp + 0xac], ecx
mov eax, dword [ebx + 0xc]
mov edx, dword [esp + 0xa0]
mov dword [eax + 0x3c020], edx
cmp dword [esp + 0xa0], 0x1e000
jge case.0x408bc3.0
xor ecx, ecx
mov dword [esp + 0xb0], ecx
mov eax, dword [esp + 0xb0]
cmp eax, dword [esp + 0xa4]
jge case.0x408bc3.0
xor edx, edx
xor ecx, ecx
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb8], ecx
xor eax, eax
xor edx, edx
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], edx
xor ecx, ecx
xor esi, esi
mov dword [esp + 0xc4], ecx
xor edi, edi
xor edx, edx
mov ecx, 0x1c
lea eax, [esp + 0xfc]
call fcn.0040bff0
mov eax, dword [esp + 0xb0]
xor edx, edx
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], edx
mov ecx, dword [esp + 0xc8]
cmp ecx, dword [esp + 0xa0]
jge 0x409373
mov ebp, edi
mov edi, dword [esp + 0xb8]
sub edi, esi
mov esi, dword [esp + 0xb8]
mov edx, dword [esp + 0xbc]
mov eax, dword [esp + 0xb4]
imul edx, esi
mov ecx, dword [esp + 0xc0]
imul ecx, edi
shl eax, 3
add eax, edx
mov edx, dword [esp + 0xc4]
imul edx, ebp
add eax, ecx
mov ecx, dword [esp + 0xa8]
inc dword [esp + 0xa8]
add eax, edx
xor edx, edx
mov ebx, dword [esp + 0xc8]
mov dl, byte [ecx]
mov ecx, dword [esp + 0xac]
add ecx, ebx
shr eax, 3
push ecx
pop ecx
and eax, 0xff
sub eax, edx
mov byte [ecx], al
mov ecx, eax
sub cl, byte [esp + 0xb4]
movsx ecx, cl
mov dword [esp + 0xb8], ecx
mov dword [esp + 0xb4], eax
movsx ecx, dl
shl ecx, 3
mov dword [esp + 0xd0], ecx
mov eax, dword [esp + 0xd0]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0xfc], eax
mov eax, ecx
sub eax, esi
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0xd4]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x100], eax
lea eax, [esi + ecx]
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0xd8]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x104], eax
mov eax, ecx
sub eax, edi
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xdc]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x108], eax
lea eax, [edi + ecx]
mov dword [esp + 0xe0], eax
mov eax, dword [esp + 0xe0]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x10c], eax
mov eax, ecx
sub eax, ebp
add ebp, ecx
mov dword [esp + 0xe4], eax
mov eax, dword [esp + 0xe4]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x110], eax
mov dword [esp + 0xe8], ebp
mov eax, dword [esp + 0xe8]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x114], eax
test byte [esp + 0xcc], 0x1f
jne case.0x4092b7.0
xor ebx, ebx
xor eax, eax
mov edx, dword [esp + 0xfc]
mov dword [esp + 0xfc], eax
mov eax, 1
mov ecx, dword [esp + eax*4 + 0xfc]
cmp edx, ecx
jbe 0x40929f
mov edx, ecx
mov ebx, eax
xor ecx, ecx
mov dword [esp + eax*4 + 0xfc], ecx
inc eax
cmp eax, 7
jl 0x409290
cmp ebx, 6
ja case.0x4092b7.0
jmp dword [ebx*4 + 0x4092be]
cmp dword [esp + 0xbc], 0xfffffff0
jl case.0x4092b7.0
dec dword [esp + 0xbc]
jmp case.0x4092b7.0
cmp dword [esp + 0xbc], 0x10
jge case.0x4092b7.0
inc dword [esp + 0xbc]
jmp case.0x4092b7.0
cmp dword [esp + 0xc0], 0xfffffff0
jl case.0x4092b7.0
dec dword [esp + 0xc0]
jmp case.0x4092b7.0
cmp dword [esp + 0xc0], 0x10
jge case.0x4092b7.0
inc dword [esp + 0xc0]
jmp case.0x4092b7.0
cmp dword [esp + 0xc4], 0xfffffff0
jl case.0x4092b7.0
dec dword [esp + 0xc4]
jmp case.0x4092b7.0
cmp dword [esp + 0xc4], 0x10
jge case.0x4092b7.0
inc dword [esp + 0xc4]
mov eax, dword [esp + 0xa4]
add dword [esp + 0xc8], eax
inc dword [esp + 0xcc]
mov edx, dword [esp + 0xc8]
cmp edx, dword [esp + 0xa0]
jl 0x409111
inc dword [esp + 0xb0]
mov eax, dword [esp + 0xb0]
cmp eax, dword [esp + 0xa4]
jl 0x4090a2
jmp case.0x408bc3.0
mov edx, dword [ebx + 0x20]
xor ecx, ecx
mov dword [esp + 0xec], edx
mov dword [esp + 0xf0], ecx
mov eax, dword [esp + 0xec]
mov dword [esp + 0xf4], eax
cmp dword [esp + 0xec], 0x1e000
jge case.0x408bc3.0
mov edx, dword [esp + 0xf0]
cmp edx, dword [esp + 0xec]
jge 0x40944d
mov ecx, dword [esp + 0xf0]
inc dword [esp + 0xf0]
mov eax, dword [ebx + 0xc]
mov dl, byte [eax + ecx]
mov byte [esp + 0xf8], dl
cmp byte [esp + 0xf8], 2
jne 0x409422
mov ecx, dword [esp + 0xf0]
inc dword [esp + 0xf0]
mov eax, dword [ebx + 0xc]
mov dl, byte [eax + ecx]
mov byte [esp + 0xf8], dl
cmp dl, 2
je 0x409422
add byte [esp + 0xf8], 0xe0
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0xf4]
mov dl, byte [esp + 0xf8]
mov byte [eax + ecx], dl
inc dword [esp + 0xf4]
mov eax, dword [esp + 0xf0]
cmp eax, dword [esp + 0xec]
jl 0x4093d5
mov ecx, dword [esp + 0xf4]
mov eax, dword [ebx + 0xc]
sub ecx, dword [esp + 0xec]
mov dword [eax + 0x3c01c], ecx
mov edx, dword [ebx + 0xc]
mov ecx, dword [esp + 0xec]
mov dword [edx + 0x3c020], ecx
add esp, 0x118
pop ebp
pop edi
pop esi
pop ebx
ret