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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x4fe040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x4feb00]
push edi
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x3dcc]
cmp eax, dword [esi + 0x3dc8]
je 0x40a4bf
call fcn.0040a150
mov eax, dword [esi + 0x3dd0]
xor edi, edi
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x3dc8]
mov dword [ebp - 8], eax
mov dword [esi + 0x3dd0], eax
mov dword [esi + 0xa8], 0
cmp dword [esi + 0x524c], edi
jle 0x40a514
xor ebx, ebx
nop dword [eax]
mov eax, dword [esi + 0x5254]
add eax, ebx
cmp dword [eax + 4], 4
jne 0x40a508
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x524c]
jl 0x40a4f0
xor ecx, ecx
mov dword [ebp - 0x14], ecx
cmp dword [esi + 0x3fd0], ecx
je 0x40a5d7
nop word [eax + eax]
mov eax, dword [esi + 0x3fd8]
mov ebx, 2
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0xc], eax
lea edi, [eax + 0x64]
push 0
mov ecx, edi
call fcn.00417ce0
add edi, 0xc
sub ebx, 1
jne 0x40a544
mov edi, dword [ebp - 0xc]
cmp dword [edi + 0x30], ebx
je 0x40a5c4
push str.Background
xor edx, edx
mov ecx, edi
call fcn.00406290
add esp, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40a5c4
cmp ecx, 1
jne 0x40a589
mov eax, dword [eax + 8]
cmp dword [eax + 0x1c], ebx
jne 0x40a589
cmp dword [eax + 0x20], ebx
je 0x40a5c4
mov ecx, dword [edi + 0x68]
lea ebx, [edi + 0x64]
mov edi, dword [ebx]
cmp edi, ecx
jne 0x40a5b7
inc edi
test ecx, ecx
je 0x40a5a5
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x40a5aa
mov eax, 8
cmp eax, edi
mov ecx, ebx
cmovg edi, eax
push edi
call fcn.00417c60
mov ecx, dword [ebx]
mov eax, dword [ebx + 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + ecx*4], edx
inc dword [ebx]
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, dword [esi + 0x3fd0]
jne 0x40a530
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
je 0x40a5e4
call fcn.00409d50
mov eax, dword [esi + 0x412c]
test eax, eax
je 0x40a608
test dword [eax + 8], 0x2000
jne 0x40a608
mov ebx, dword [eax + 0x2e8]
mov eax, dword [esi + 0x4134]
mov dword [ebp - 0x10], ebx
jmp 0x40a61b
xor ebx, ebx
mov dword [ebp - 0x10], ebx
test eax, eax
je 0x40a619
mov eax, dword [esi + 0x4134]
jmp 0x40a61b
xor eax, eax
xor edi, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
cmp dword [esi + 0x3de0], edi
je 0x40a673
nop dword [eax + eax]
mov eax, dword [esi + 0x3de8]
mov ecx, dword [eax + edi*4]
cmp byte [ecx + 0x8e], 0
je 0x40a66a
cmp byte [ecx + 0x95], 0
jne 0x40a66a
mov edx, dword [ecx + 8]
test edx, 0x1000000
jne 0x40a66a
cmp ecx, ebx
je 0x40a66a
cmp ecx, dword [ebp - 0x14]
je 0x40a66a
shr edx, 0x19
and edx, 1
call fcn.00409970
inc edi
cmp edi, dword [esi + 0x3de0]
jne 0x40a630
xor edi, edi
mov ecx, dword [ebp + edi*4 - 0x10]
test ecx, ecx
je 0x40a69d
cmp byte [ecx + 0x8e], 0
je 0x40a69d
cmp byte [ecx + 0x95], 0
jne 0x40a69d
mov edx, dword [ecx + 8]
shr edx, 0x19
and edx, 1
call fcn.00409970
inc edi
cmp edi, 2
jl 0x40a675
cmp byte [esi + 0x60], 0
je 0x40a6db
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
je 0x40a6db
mov ecx, dword [esi + 0x4158]
cmp ecx, 0xffffffff
je 0x40a6db
push dword [esi + 0xdbc]
movss xmm0, dword [esi + 0x3850]
push dword [esi + 0xdb8]
sub esp, 8
call fcn.00405100
add esp, 0x10
xor ecx, ecx
mov dword [esi + 0xa4], 0
mov dword [esi + 0xa0], 0
mov dword [ebp - 0x18], ecx
cmp dword [esi + 0x3fd0], ecx
jle 0x40a889
mov eax, dword [esi + 0x3fd8]
mov ebx, dword [eax + ecx*4]
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x70]
add eax, ecx
mov dword [ebp - 0xc], ecx
push eax
lea ecx, [ebx + 0x64]
call fcn.00417ce0
mov eax, dword [ebx + 0x70]
test eax, eax
je 0x40a747
mov ecx, dword [ebp - 0xc]
shl eax, 2
push eax
mov eax, dword [ebx + 0x6c]
push dword [ebx + 0x78]
lea eax, [eax + ecx*4]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea ecx, [ebx + 0x70]
push 0
call fcn.00417ce0
cmp dword [ebx + 0x34], 0
je 0x40a7c0
push str.Foreground
mov edx, 1
mov ecx, ebx
call fcn.00406290
add esp, 4
mov dword [ebp - 8], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40a7c0
cmp ecx, 1
jne 0x40a77e
mov eax, dword [eax + 8]
cmp dword [eax + 0x1c], 0
jne 0x40a77e
cmp dword [eax + 0x20], 0
je 0x40a7c0
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x68]
cmp edx, ecx
jne 0x40a7b1
inc edx
mov dword [ebp - 0xc], edx
test ecx, ecx
je 0x40a79e
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0xc]
sar eax, 1
add eax, ecx
jmp 0x40a7a3
mov eax, 8
cmp eax, edx
lea ecx, [ebx + 0x64]
cmovg edx, eax
push edx
call fcn.00417c60
mov ecx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x6c]
mov edx, dword [ebp - 8]
mov dword [eax + ecx*4], edx
inc dword [ebx + 0x64]
mov edx, dword [0x4feb00]
mov byte [ebx + 0x38], 1
cmp dword [ebx + 0x64], 0
jle 0x40a7d5
mov eax, dword [ebx + 0x6c]
jmp 0x40a7d7
xor eax, eax
mov dword [ebx + 0x48], eax
mov eax, dword [ebx + 0x64]
mov dword [ebx + 0x3c], eax
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov dword [ebx + 0x4c], eax
mov dword [ebx + 0x50], ecx
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x10]
mov dword [ebx + 0x54], eax
mov dword [ebx + 0x58], ecx
mov eax, dword [edx + 0x58]
mov ecx, dword [edx + 0x5c]
mov dword [ebx + 0x5c], eax
xor eax, eax
mov dword [ebx + 0x60], ecx
xor ecx, ecx
mov dword [ebp - 8], ecx
cmp dword [ebx + 0x64], eax
jle 0x40a867
nop
mov eax, dword [ebx + 0x6c]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx]
test eax, eax
je 0x40a843
mov esi, dword [edx + 8]
lea ecx, [eax + eax*4]
cmp dword [esi + ecx*8 - 0xc], 0
jne 0x40a843
cmp dword [esi + ecx*8 - 8], 0
jne 0x40a843
dec eax
mov dword [edx], eax
mov eax, dword [ebx + 0x44]
add eax, dword [edx + 0x18]
mov ecx, dword [ebp - 8]
mov dword [ebx + 0x44], eax
inc ecx
mov dword [ebp - 0xc], eax
mov eax, dword [edx + 0xc]
add dword [ebx + 0x40], eax
mov dword [ebp - 8], ecx
cmp ecx, dword [ebx + 0x64]
jl 0x40a820
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
add dword [esi + 0xa0], eax
inc ecx
mov eax, dword [ebx + 0x40]
add dword [esi + 0xa4], eax
mov dword [ebp - 0x18], ecx
cmp ecx, dword [esi + 0x3fd0]
jl 0x40a700
xor edi, edi
cmp dword [esi + 0x524c], edi
jle 0x40a8c4
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [esi + 0x5254]
add eax, ebx
cmp dword [eax + 4], 5
jne 0x40a8b8
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x524c]
jl 0x40a8a0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043e7f2
mov esp, ebp
pop ebp
ret