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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, dword [0x4a0fd0]
push esi
push edi
mov dword [esp + 0x24], ebx
mov eax, dword [ebx + 0x3ddc]
cmp eax, dword [ebx + 0x3dd8]
je 0x4082a9
call fcn.00407eb0
mov eax, dword [ebx + 0x3de0]
xor esi, esi
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x3dd8]
mov dword [esp + 0x14], eax
mov dword [ebx + 0x3de0], eax
mov dword [ebx + 0xa4], 0
cmp dword [ebx + 0x5a98], esi
jle 0x408304
xor edi, edi
nop dword [eax]
mov eax, dword [ebx + 0x5aa0]
add eax, edi
cmp dword [eax + 4], 4
jne 0x4082f8
push eax
mov eax, dword [eax + 0xc]
push ebx
call eax
add esp, 8
inc esi
add edi, 0x14
cmp esi, dword [ebx + 0x5a98]
jl 0x4082e0
xor ecx, ecx
mov dword [esp + 0xc], ecx
cmp dword [ebx + 0x47d0], ecx
je 0x408431
nop word [eax + eax]
mov eax, dword [ebx + 0x47d8]
mov esi, dword [0x4a0fd0]
push 0
mov edi, dword [eax + ecx*4]
lea ecx, [edi + 0x48]
lea eax, [edi + 0x78]
mov dword [edi + 0x70], ecx
mov dword [edi + 0x74], eax
call fcn.00417550
mov ecx, dword [edi + 0x74]
push 0
call fcn.00417550
mov byte [edi + 0x38], 1
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
mov dword [edi + 0x54], eax
mov dword [edi + 0x58], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x10]
mov dword [edi + 0x5c], eax
mov dword [edi + 0x60], ecx
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x40]
mov dword [edi + 0x64], eax
mov dword [edi + 0x68], ecx
mov dword [edi + 0x6c], edi
cmp dword [edi + 0x30], 0
je 0x40841c
push str.Background
xor edx, edx
mov ecx, edi
call fcn.00405b20
mov esi, dword [edi + 0x70]
mov edx, eax
add esp, 4
mov dword [esp + 0x1c], edx
mov eax, dword [edx]
test eax, eax
je 0x40841c
cmp eax, 1
jne 0x4083ca
mov eax, dword [edx + 8]
cmp dword [eax + 0x1c], 0
jne 0x4083ca
cmp dword [eax + 0x20], 0
je 0x40841c
mov eax, dword [esi]
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x408403
lea edx, [eax + 1]
mov dword [esp + 0x18], edx
test ecx, ecx
je 0x4083ed
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
add eax, ecx
jmp 0x4083f2
mov eax, 8
cmp eax, edx
mov ecx, esi
cmovg edx, eax
push edx
call fcn.00417420
mov edx, dword [esp + 0x1c]
mov ecx, dword [esi]
mov eax, dword [esi + 8]
mov dword [eax + ecx*4], edx
inc dword [esi]
inc dword [edi + 0x3c]
mov eax, dword [edx + 0x18]
add dword [edi + 0x44], eax
mov eax, dword [edx + 0xc]
add dword [edi + 0x40], eax
mov ecx, dword [esp + 0xc]
inc ecx
mov dword [esp + 0xc], ecx
cmp ecx, dword [ebx + 0x47d0]
jne 0x408320
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
je 0x408440
call fcn.00407aa0
mov eax, dword [ebx + 0x4948]
test eax, eax
je 0x408465
test dword [eax + 0xc], 0x2000
jne 0x408465
mov edi, dword [eax + 0x300]
mov eax, dword [ebx + 0x4950]
mov dword [esp + 0x1c], edi
jmp 0x408479
xor edi, edi
mov dword [esp + 0x1c], edi
test eax, eax
je 0x408477
mov eax, dword [ebx + 0x4950]
jmp 0x408479
xor eax, eax
xor esi, esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], eax
cmp dword [ebx + 0x3e10], esi
je 0x4084d4
nop dword [eax + eax]
mov eax, dword [ebx + 0x3e18]
mov ecx, dword [eax + esi*4]
cmp byte [ecx + 0xaa], 0
je 0x4084cb
cmp byte [ecx + 0xb1], 0
jne 0x4084cb
mov edx, dword [ecx + 0xc]
test edx, 0x1000000
jne 0x4084cb
cmp ecx, edi
je 0x4084cb
cmp ecx, dword [esp + 0xc]
je 0x4084cb
shr edx, 0x19
and edx, 1
call fcn.004076c0
inc esi
cmp esi, dword [ebx + 0x3e10]
jne 0x408490
xor esi, esi
mov ecx, dword [esp + esi*4 + 0x1c]
test ecx, ecx
je 0x4084fe
cmp byte [ecx + 0xaa], 0
je 0x4084fe
cmp byte [ecx + 0xb1], 0
jne 0x4084fe
mov edx, dword [ecx + 0xc]
shr edx, 0x19
and edx, 1
call fcn.004076c0
inc esi
cmp esi, 2
jl 0x4084d6
cmp byte [ebx + 0x44], 0
je 0x40853e
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
je 0x40853e
mov ecx, dword [ebx + 0x4ab4]
cmp ecx, 0xffffffff
je 0x40853e
push dword [ebx + 0xdbc]
movss xmm0, dword [ebx + 0x384c]
push dword [ebx + 0xdb8]
sub esp, 8
call fcn.004045f0
add esp, 0x10
xor ecx, ecx
mov dword [ebx + 0xa0], 0
mov dword [ebx + 0x9c], 0
mov dword [esp + 0x14], ecx
cmp dword [ebx + 0x47d0], ecx
jle 0x4086bc
mov eax, dword [ebx + 0x47d8]
mov edi, dword [eax + ecx*4]
mov eax, dword [edi + 0x74]
mov ecx, dword [edi + 0x70]
mov eax, dword [eax]
mov edx, dword [ecx]
add eax, edx
push eax
mov dword [esp + 0x20], edx
call fcn.00417550
mov esi, dword [edi + 0x74]
mov eax, dword [esi]
test eax, eax
je 0x4085b2
mov ecx, dword [esp + 0x1c]
shl eax, 2
push eax
mov eax, dword [edi + 0x70]
push dword [esi + 8]
mov eax, dword [eax + 8]
lea eax, [eax + ecx*4]
push eax
call fcn.00451a70
add esp, 0xc
mov ecx, esi
push 0
call fcn.00417550
cmp dword [edi + 0x34], 0
je 0x408645
push str.Foreground
mov edx, 1
mov ecx, edi
call fcn.00405b20
mov esi, dword [edi + 0x70]
mov edx, eax
add esp, 4
mov dword [esp + 0x18], edx
mov eax, dword [edx]
test eax, eax
je 0x408645
cmp eax, 1
jne 0x4085f3
mov eax, dword [edx + 8]
cmp dword [eax + 0x1c], 0
jne 0x4085f3
cmp dword [eax + 0x20], 0
je 0x408645
mov eax, dword [esi]
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x40862c
lea edx, [eax + 1]
mov dword [esp + 0x1c], edx
test ecx, ecx
je 0x408616
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 1
add eax, ecx
jmp 0x40861b
mov eax, 8
cmp eax, edx
mov ecx, esi
cmovg edx, eax
push edx
call fcn.00417420
mov edx, dword [esp + 0x18]
mov ecx, dword [esi]
mov eax, dword [esi + 8]
mov dword [eax + ecx*4], edx
inc dword [esi]
inc dword [edi + 0x3c]
mov eax, dword [edx + 0x18]
add dword [edi + 0x44], eax
mov eax, dword [edx + 0xc]
add dword [edi + 0x40], eax
cmp dword [edi + 0x48], 0
mov dword [esp + 0x1c], 0
jle 0x408695
mov ebx, dword [esp + 0x1c]
mov eax, dword [edi + 0x50]
mov esi, dword [eax + ebx*4]
mov ecx, dword [esi]
test ecx, ecx
jle 0x40868b
lea eax, [ecx + ecx*4]
shl eax, 3
nop dword [eax]
mov edx, dword [esi + 8]
cmp dword [edx + eax - 0xc], 0
jne 0x40868b
cmp dword [edx + eax - 8], 0
jne 0x40868b
dec ecx
sub eax, 0x28
mov dword [esi], ecx
test ecx, ecx
jg 0x408670
inc ebx
cmp ebx, dword [edi + 0x48]
jl 0x408657
mov ebx, dword [esp + 0x24]
mov eax, dword [edi + 0x44]
mov ecx, dword [esp + 0x14]
add dword [ebx + 0x9c], eax
inc ecx
mov eax, dword [edi + 0x40]
add dword [ebx + 0xa0], eax
mov dword [esp + 0x14], ecx
cmp ecx, dword [ebx + 0x47d0]
jl 0x408564
xor esi, esi
cmp dword [ebx + 0x5a98], esi
jle 0x4086f4
xor edi, edi
nop dword [eax + eax]
mov eax, dword [ebx + 0x5aa0]
add eax, edi
cmp dword [eax + 4], 5
jne 0x4086e8
push eax
mov eax, dword [eax + 0xc]
push ebx
call eax
add esp, 8
inc esi
add edi, 0x14
cmp esi, dword [ebx + 0x5a98]
jl 0x4086d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret