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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
movaps xmm0, xmm3
mov esi, ecx
movsd qword [esp + 0x44], xmm0
mov ebp, edx
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x58]
push edi
mov edi, dword [esp + 0x48]
mov eax, edi
or eax, ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x54], esi
mov dword [esp + 0x20], edi
jne 0x408a10
xor ecx, ecx
mov eax, ebp
test edx, edx
setne cl
sub eax, esi
add ecx, 5
sar eax, 1
add ecx, edx
cmp eax, ecx
jge 0x4089c7
mov edx, 0x84
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
mov eax, 0x30
mov word [esi], ax
add esi, 2
test edx, edx
je 0x4089f6
mov eax, 0x2e
mov ecx, edx
mov word [esi], ax
add esi, 2
shr ecx, 1
mov edi, esi
mov eax, 0x300030
rep stosd dword es:[edi], eax
adc ecx, ecx
lea esi, [esi + edx*2]
rep stosw word es:[edi], ax
mov dword [esi], 0x2b0065
lea eax, [esi + 8]
mov dword [esi + 4], 0x300030
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
mov ebx, ecx
inc edx
and ebx, 0xfffff
shr ecx, 0x14
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], edx
test ecx, ecx
jne 0x408a42
mov eax, 0xfffffbce
mov dword [esp + 0x1c], ecx
xor ebx, ebx
mov dword [esp + 0x24], eax
xor edi, edi
mov dword [esp + 0x18], ecx
jmp 0x408c98
lea eax, [ecx - 0x433]
mov dword [esp + 0x38], edi
xor ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], ecx
or ebx, 0x100000
mov ecx, dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 0x24], ecx
xor edi, edi
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x30], ebx
xor ebx, ebx
cmp dword [esp + 0x2c], 0xffffffcc
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x28], ecx
mov ecx, eax
mov dword [esp + 0x18], eax
jl 0x408c49
mov ecx, dword [esp + 0x2c]
test ecx, ecx
jns 0x408aa4
lea eax, [ebx + 0x78]
mov dword [esp + 0x34], 1
jmp 0x408afc
add ecx, 0xf
shr ecx, 4
mov eax, ecx
mov dword [esp + 0x44], ecx
imul ecx, ecx, 0x134410
shl eax, 4
add eax, 0x78
mov dword [esp + 0x40], eax
mov eax, 0x38e38e39
shr ecx, 0x12
add ecx, 0x19
mul ecx
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
shr edx, 1
sub edx, 1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
js 0x408c37
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0x38]
sub eax, ecx
mov edx, dword [esp + 0x30]
add eax, 8
mov dword [esp + 0x48], eax
mov eax, ebx
shld edx, eax, 8
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x30]
shl eax, 8
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x40], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ecx
lea eax, [edx + edx*8]
mov dword [esp + 0x38], eax
movzx eax, word [edi*2 + 0x428c00]
add eax, edx
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x428d58]
mov dword [esp + 0x2c], eax
push dword [esp + 0x44]
mov edx, dword [esp + 0x4c]
mov ecx, eax
push dword [esp + 0x44]
call fcn.00408560
mov ecx, dword [esp + 0x24]
add esp, 8
mov ebx, eax
test ecx, ecx
je 0x408ba2
mov edx, dword [esp + 0x14]
lea edi, [ecx + 9]
cmp edi, edx
ja 0x408c2a
mov ecx, ebp
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x12
jl 0x4089b8
mov edx, esi
mov ecx, ebx
call fcn.00409080
add esi, 0x12
mov ecx, edi
xor edi, edi
jmp 0x408c06
xor edi, edi
test ebx, ebx
je 0x408c0a
mov ecx, ebx
call fcn.00408430
mov edx, dword [esp + 0x14]
mov edi, eax
mov eax, dword [esp + 0x38]
dec eax
add eax, edi
mov dword [esp + 0x18], eax
cmp edi, edx
ja 0x408c31
cmp dword [esp + 0x3c], 0
jbe 0x408bee
mov ecx, ebp
lea eax, [edi + 1]
sub ecx, esi
sar ecx, 1
cmp ecx, eax
jl 0x4089b8
push esi
mov edx, ebx
mov ecx, edi
call fcn.004088a0
add esp, 4
lea esi, [esi + edi*2]
jmp 0x408bff
cmp esi, ebp
je 0x4089b8
mov al, bl
add al, 0x30
cbw
mov word [esi], ax
mov ecx, edi
xor edi, edi
add esi, 2
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x34]
sub dword [esp + 0x2c], 0x18
dec eax
sub dword [esp + 0x38], 9
mov dword [esp + 0x34], eax
test eax, eax
js 0x408c41
mov eax, dword [esp + 0x2c]
jmp 0x408b51
mov edi, 9
jmp 0x408c45
mov ecx, dword [esp + 0x1c]
jmp 0x408c49
mov edx, dword [esp + 0x14]
xor ecx, ecx
xor eax, eax
jmp 0x408c49
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x24], 0
mov dword [esp + 0x38], edi
jge 0x408dff
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], edx
test edi, edi
jne 0x408dff
mov eax, dword [esp + 0x24]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
neg eax
mov dword [esp + 0x44], eax
movzx edx, byte [eax + 0x442830]
cmp edx, 0xc8
jae 0x408dff
movzx ebx, word [eax*2 + 0x428c82]
lea edx, [edx + edx*8]
mov dword [esp + 0x48], ebx
movzx ebx, word [eax*2 + 0x428c80]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ebx
lea eax, [ebx + ebx*2]
lea eax, [eax*8 + 0x430270]
mov dword [esp + 0x2c], eax
cmp ebx, dword [esp + 0x48]
jb 0x408cf1
xor ebx, ebx
jmp 0x408d2c
mov ecx, dword [esp + 0x20]
mov edx, 8
mov eax, dword [esp + 0x28]
sub edx, dword [esp + 0x44]
shld eax, ecx, 8
shl edx, 4
sub edx, dword [esp + 0x24]
shl ecx, 8
push eax
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00408560
mov ecx, dword [esp + 0x24]
mov ebx, eax
mov edx, dword [esp + 0x3c]
add esp, 8
mov eax, dword [esp + 0x2c]
test ecx, ecx
je 0x408d69
mov eax, dword [esp + 0x14]
add ecx, 9
mov dword [esp + 0x40], ecx
cmp ecx, eax
ja 0x408df8
mov eax, ebp
sub eax, esi
and eax, 0xfffffffe
cmp eax, 0x12
jl 0x4089b8
mov edx, esi
mov ecx, ebx
call fcn.00409080
mov ecx, dword [esp + 0x40]
add esi, 0x12
mov edx, dword [esp + 0x34]
jmp 0x408dcd
test ebx, ebx
je 0x408dd5
mov ecx, ebx
call fcn.00408430
mov edi, eax
sub eax, edx
sub eax, 0xa
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
cmp edi, eax
ja 0x408e03
cmp dword [esp + 0x3c], 0
jbe 0x408db5
mov ecx, ebp
lea eax, [edi + 1]
sub ecx, esi
sar ecx, 1
cmp ecx, eax
jl 0x4089b8
push esi
mov edx, ebx
mov ecx, edi
call fcn.004088a0
mov edx, dword [esp + 0x38]
lea esi, [esi + edi*2]
add esp, 4
jmp 0x408dc6
cmp esi, ebp
je 0x4089b8
mov al, bl
add al, 0x30
cbw
mov word [esi], ax
mov ecx, edi
xor edi, edi
add esi, 2
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], ecx
inc dword [esp + 0x38]
add edx, 9
add eax, 0x18
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], eax
cmp edx, 0x708
jge 0x408dff
mov ebx, dword [esp + 0x38]
jmp 0x408ce7
mov edi, 9
jmp 0x408e03
mov eax, dword [esp + 0x14]
mov ecx, eax
xor edx, edx
sub ecx, dword [esp + 0x1c]
test edi, edi
mov dword [esp + 0x2c], ecx
cmovne edx, ebx
xor eax, eax
mov ebx, edx
cmp edi, ecx
jbe 0x408ef0
sub edi, ecx
je 0x408ef0
nop dword [eax + eax]
mov eax, 0xcccccccd
mov ecx, ebx
mul ebx
shr edx, 3
mov ebx, edx
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
mov dword [esp + 0x48], ecx
sub edi, 1
jne 0x408e30
cmp ecx, 5
mov ecx, dword [esp + 0x2c]
jne 0x408eec
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x14], eax
lea edx, [eax + ecx]
neg edx
test edx, edx
jle 0x408eb4
cmp edx, 0x3c
jge 0x408eac
xor ecx, ecx
xor eax, eax
bts ecx, edx
cmp edx, 0x20
cmovae eax, ecx
xor ecx, eax
cmp edx, 0x40
mov edx, dword [esp + 0x28]
cmovae eax, ecx
add ecx, 0xffffffff
adc eax, 0xffffffff
and ecx, edi
and eax, edx
or ecx, eax
mov eax, dword [esp + 0x14]
je 0x408eb8
xor cl, cl
jmp 0x408eba
mov edx, dword [esp + 0x28]
xor cl, cl
jmp 0x408eba
mov edx, dword [esp + 0x28]
mov cl, 1
test eax, eax
jns 0x408ee2
test cl, cl
je 0x408ee0
neg eax
push edx
push edi
mov ecx, eax
call fcn.004084a0
add esp, 8
test al, al
je 0x408ee0
mov cl, 1
movzx eax, cl
mov ecx, dword [esp + 0x2c]
inc eax
jmp 0x408efb
xor cl, cl
movzx eax, cl
mov ecx, dword [esp + 0x2c]
inc eax
jmp 0x408efb
mov eax, dword [esp + 0x48]
mov edx, 5
cmp edx, eax
sbb eax, eax
neg eax
cmp dword [esp + 0x1c], 0
mov dword [esp + 0x38], eax
je 0x408f49
mov eax, ebp
sub eax, esi
sar eax, 1
cmp eax, ecx
jl 0x4089b8
test ebx, ebx
jne 0x408f35
test ecx, ecx
je 0x408f44
shr ecx, 1
mov edi, esi
mov eax, 0x300030
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [esp + 0x2c]
lea esi, [esi + ecx*2]
jmp 0x408f8c
push esi
mov edx, ebx
call fcn.00409100
mov ecx, dword [esp + 0x30]
add esp, 4
lea esi, [esi + ecx*2]
jmp 0x408f8c
cmp dword [esp + 0x3c], 0
jbe 0x408f77
mov edi, dword [esp + 0x2c]
mov ecx, ebp
sub ecx, esi
sar ecx, 1
lea eax, [edi + 1]
cmp ecx, eax
jl 0x4089b8
push esi
mov edx, ebx
mov ecx, edi
call fcn.004088a0
add esp, 4
lea esi, [esi + edi*2]
jmp 0x408f89
cmp esi, ebp
je 0x4089b8
add bl, 0x30
movsx ax, bl
mov word [esi], ax
add esi, 2
mov edx, dword [esp + 0x38]
test edx, edx
je 0x408fde
mov ebx, dword [esp + 0x54]
mov ecx, esi
cmp esi, ebx
je 0x408fbe
mov edi, 0x30
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, 0x2e
je 0x408fba
cmp eax, 0x39
jne 0x408fd1
mov word [ecx], di
lea edx, [eax - 0x38]
cmp ecx, ebx
jne 0x408fa3
mov eax, 0x31
mov word [ecx], ax
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
jmp 0x408fe2
cmp edx, 1
je 0x408fda
test al, 1
je 0x408fde
inc eax
mov word [ecx], ax
mov eax, dword [esp + 0x18]
cdq
xor ecx, ecx
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov edx, ebp
sub edx, esi
sar edx, 1
cmp ebx, 0x64
setge cl
add ecx, 4
cmp edx, ecx
jl 0x4089b8
mov eax, 0x65
mov word [esi], ax
xor eax, eax
cmp dword [esp + 0x18], eax
setl al
lea eax, [eax*2 + 0x2b]
mov word [esi + 2], ax
cmp ebx, 0x64
jl 0x409063
mov eax, 0x66666667
imul ebx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov eax, dword [ecx*4 + 0x4300e0]
mov dword [esi + 4], eax
mov al, cl
shl cl, 2
add al, cl
add al, al
sub bl, al
add bl, 0x30
movsx ax, bl
mov word [esi + 8], ax
add esi, 0xa
mov eax, esi
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
mov eax, dword [ebx*4 + 0x4300e0]
mov dword [esi + 4], eax
add esi, 8
pop edi
mov eax, esi
xor edx, edx
pop esi
pop ebp
pop ebx
add esp, 0x48
ret