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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x4f8f48]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x4fc310]
push edi
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x3dbc]
cmp eax, dword [esi + 0x3db8]
je 0x408e2f
call fcn.00408af0
mov eax, dword [esi + 0x3dc0]
xor edi, edi
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x3db8]
mov dword [ebp - 8], eax
mov dword [esi + 0x3dc0], eax
mov dword [esi + 0xa8], 0
cmp dword [esi + 0x523c], edi
jle 0x408e84
xor ebx, ebx
nop dword [eax]
mov eax, dword [esi + 0x5244]
add eax, ebx
cmp dword [eax + 4], 4
jne 0x408e78
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x523c]
jl 0x408e60
xor ecx, ecx
mov dword [ebp - 0x14], ecx
cmp dword [esi + 0x3fc0], ecx
je 0x408f47
nop word [eax + eax]
mov eax, dword [esi + 0x3fc8]
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.00417030
add edi, 0xc
sub ebx, 1
jne 0x408eb4
mov edi, dword [ebp - 0xc]
cmp dword [edi + 0x30], ebx
je 0x408f34
push str.Background
xor edx, edx
mov ecx, edi
call fcn.00405760
add esp, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x408f34
cmp ecx, 1
jne 0x408ef9
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], ebx
jne 0x408ef9
cmp dword [ecx + 0x20], ebx
je 0x408f34
mov ecx, dword [edi + 0x68]
lea ebx, [edi + 0x64]
mov edi, dword [ebx]
cmp edi, ecx
jne 0x408f27
inc edi
test ecx, ecx
je 0x408f15
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x408f1a
mov eax, 8
cmp eax, edi
mov ecx, ebx
cmovg edi, eax
push edi
call fcn.00416fb0
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 + 0x3fc0]
jne 0x408ea0
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
je 0x408f54
call fcn.004086f0
mov eax, dword [esi + 0x411c]
test eax, eax
je 0x408f78
test dword [eax + 8], 0x2000
jne 0x408f78
mov ebx, dword [eax + 0x2e8]
mov eax, dword [esi + 0x4124]
mov dword [ebp - 0x10], ebx
jmp 0x408f8b
xor ebx, ebx
mov dword [ebp - 0x10], ebx
test eax, eax
je 0x408f89
mov eax, dword [esi + 0x4124]
jmp 0x408f8b
xor eax, eax
xor edi, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
cmp dword [esi + 0x3dd0], edi
je 0x408fe3
nop dword [eax + eax]
mov eax, dword [esi + 0x3dd8]
mov ecx, dword [eax + edi*4]
cmp byte [ecx + 0x8e], 0
je 0x408fda
cmp byte [ecx + 0x95], 0
jne 0x408fda
mov edx, dword [ecx + 8]
test edx, 0x1000000
jne 0x408fda
cmp ecx, ebx
je 0x408fda
cmp ecx, dword [ebp - 0x14]
je 0x408fda
shr edx, 0x19
and edx, 1
call fcn.00408310
inc edi
cmp edi, dword [esi + 0x3dd0]
jne 0x408fa0
xor edi, edi
mov ecx, dword [ebp + edi*4 - 0x10]
test ecx, ecx
je 0x40900d
cmp byte [ecx + 0x8e], 0
je 0x40900d
cmp byte [ecx + 0x95], 0
jne 0x40900d
mov edx, dword [ecx + 8]
shr edx, 0x19
and edx, 1
call fcn.00408310
inc edi
cmp edi, 2
jl 0x408fe5
cmp byte [esi + 0x60], 0
je 0x40904b
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
je 0x40904b
mov ecx, dword [esi + 0x4148]
cmp ecx, 0xffffffff
je 0x40904b
push dword [esi + 0xdbc]
movss xmm0, dword [esi + 0x3850]
push dword [esi + 0xdb8]
sub esp, 8
call fcn.00404760
add esp, 0x10
xor ecx, ecx
mov dword [esi + 0xa4], 0
mov dword [esi + 0xa0], 0
mov dword [ebp - 0x18], ecx
cmp dword [esi + 0x3fc0], ecx
jle 0x4091f9
mov eax, dword [esi + 0x3fc8]
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.00417030
mov eax, dword [ebx + 0x70]
test eax, eax
je 0x4090b7
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.00417030
cmp dword [ebx + 0x34], 0
je 0x409130
push str.Foreground
mov edx, 1
mov ecx, ebx
call fcn.00405760
add esp, 4
mov dword [ebp - 8], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x409130
cmp ecx, 1
jne 0x4090ee
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], 0
jne 0x4090ee
cmp dword [ecx + 0x20], 0
je 0x409130
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x68]
cmp edx, ecx
jne 0x409121
inc edx
mov dword [ebp - 0xc], edx
test ecx, ecx
je 0x40910e
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0xc]
sar eax, 1
add eax, ecx
jmp 0x409113
mov eax, 8
cmp eax, edx
lea ecx, [ebx + 0x64]
cmovg edx, eax
push edx
call fcn.00416fb0
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 [0x4fc310]
mov byte [ebx + 0x38], 1
cmp dword [ebx + 0x64], 0
jle 0x409145
mov eax, dword [ebx + 0x6c]
jmp 0x409147
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 0x4091d7
nop
mov eax, dword [ebx + 0x6c]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx]
test eax, eax
je 0x4091b3
mov esi, dword [edx + 8]
lea ecx, [eax + eax*4]
cmp dword [esi + ecx*8 - 0xc], 0
jne 0x4091b3
cmp dword [esi + ecx*8 - 8], 0
jne 0x4091b3
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 0x409190
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 + 0x3fc0]
jl 0x409070
xor edi, edi
cmp dword [esi + 0x523c], edi
jle 0x409234
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [esi + 0x5244]
add eax, ebx
cmp dword [eax + 4], 5
jne 0x409228
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x523c]
jl 0x409210
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b50b5
mov esp, ebp
pop ebp
ret