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

Disassembly:
sub esp, 0x1c
mov eax, dword [0x48b040]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
mov ebx, dword [0x48d2c8]
push ebp
push esi
push edi
mov eax, dword [ebx + 0x3f0c]
mov dword [esp + 0x14], ebx
cmp eax, dword [ebx + 0x3f08]
je 0x4099cf
call fcn.004095d0
mov eax, dword [ebx + 0x3f08]
cmp dword [ebx + 0x3f10], eax
je 0x409e4a
mov dword [ebx + 0x3f10], eax
mov dword [ebx + 0xa8], 0
mov eax, dword [ebx + 0x5df4]
mov esi, dword [ebx + 0x5dfc]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x409a1e
cmp dword [esi + 4], 4
jne 0x409a17
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x409a07
call fcn.004091e0
mov eax, dword [ebx + 0x4a2c]
mov ebp, dword [ebx + 0x4a34]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x1c], eax
cmp ebp, eax
je 0x409b7d
mov esi, dword [ebp]
mov ebx, dword [0x48d2c8]
lea edi, [esi + 0x4c]
lea eax, [esi + 0x7c]
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], eax
mov ecx, dword [edi + 4]
test ecx, ecx
jns 0x409a78
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
mov ecx, edi
call fcn.0041a620
mov dword [edi], 0
mov edi, dword [esi + 0x78]
mov ecx, dword [edi + 4]
test ecx, ecx
jns 0x409aa0
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
mov ecx, edi
call fcn.0041a620
mov dword [edi], 0
mov byte [esi + 0x3c], 1
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x60], eax
mov dword [esi + 0x64], ecx
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x40]
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], ecx
mov dword [esi + 0x70], esi
cmp dword [esi + 0x34], 0
je 0x409b6c
push str.Background
xor edx, edx
mov ecx, esi
call fcn.00407280
mov edi, dword [esi + 0x74]
mov ebx, eax
add esp, 4
mov eax, dword [ebx]
test eax, eax
je 0x409b6c
cmp eax, 1
jne 0x409b20
mov eax, dword [ebx + 8]
cmp dword [eax + 0x1c], 0
jne 0x409b20
cmp dword [eax + 0x20], 0
je 0x409b6c
mov edx, dword [edi]
mov ecx, dword [edi + 4]
cmp edx, ecx
jne 0x409b53
inc edx
mov dword [esp + 0x18], edx
test ecx, ecx
je 0x409b41
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
add eax, ecx
jmp 0x409b46
mov eax, 8
cmp eax, edx
mov ecx, edi
cmovg edx, eax
push edx
call fcn.0041a620
mov ecx, dword [edi]
mov eax, dword [edi + 8]
mov dword [eax + ecx*4], ebx
inc dword [edi]
inc dword [esi + 0x40]
mov eax, dword [ebx + 0x18]
add dword [esi + 0x48], eax
mov eax, dword [ebx + 0xc]
add dword [esi + 0x44], eax
add ebp, 4
cmp ebp, dword [esp + 0x1c]
jne 0x409a44
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx + 0x4c00]
test eax, eax
je 0x409ba2
test dword [eax + 0xc], 0x2000
jne 0x409ba2
mov edi, dword [eax + 0x30c]
mov ebx, dword [ebx + 0x4c08]
mov dword [esp + 0x20], edi
jmp 0x409bb6
xor edi, edi
mov dword [esp + 0x20], edi
test eax, eax
je 0x409bb4
mov ebx, dword [ebx + 0x4c08]
jmp 0x409bb6
xor ebx, ebx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
mov esi, dword [eax + 0x3f48]
mov eax, dword [eax + 0x3f40]
lea ebp, [esi + eax*4]
cmp esi, ebp
je 0x409c0a
mov ecx, dword [esi]
cmp byte [ecx + 0xae], 0
je 0x409c03
cmp byte [ecx + 0xb5], 0
jne 0x409c03
mov edx, dword [ecx + 0xc]
test edx, 0x1000000
jne 0x409c03
cmp ecx, edi
je 0x409c03
cmp ecx, ebx
je 0x409c03
shr edx, 0x19
and edx, 1
call fcn.00408de0
add esi, 4
cmp esi, ebp
jne 0x409bd1
xor esi, esi
nop dword [eax]
mov ecx, dword [esp + esi*4 + 0x20]
test ecx, ecx
je 0x409c38
cmp byte [ecx + 0xae], 0
je 0x409c38
cmp byte [ecx + 0xb5], 0
jne 0x409c38
mov edx, dword [ecx + 0xc]
shr edx, 0x19
and edx, 1
call fcn.00408de0
inc esi
cmp esi, 2
jl 0x409c10
mov ebx, dword [esp + 0x14]
cmp byte [ebx + 0x44], 0
je 0x409c72
mov ecx, dword [ebx + 0x4d84]
cmp ecx, 0xffffffff
je 0x409c72
push dword [ebx + 0xe04]
movss xmm0, dword [ebx + 0x397c]
push dword [ebx + 0xe00]
sub esp, 8
call fcn.00404f60
add esp, 0x10
mov dword [ebx + 0xa4], 0
mov dword [ebx + 0xa0], 0
mov ecx, dword [ebx + 0x4a34]
mov eax, dword [ebx + 0x4a2c]
mov dword [esp + 0x18], ecx
lea eax, [ecx + eax*4]
mov dword [esp + 0x20], eax
cmp ecx, eax
je 0x409e1d
mov ebp, dword [ecx]
mov ebx, dword [ebp + 0x74]
mov eax, dword [ebp + 0x78]
mov ecx, dword [ebx]
mov esi, dword [eax]
mov edi, dword [ebx + 4]
add esi, ecx
mov dword [esp + 0x1c], ecx
cmp esi, edi
jle 0x409ce7
test edi, edi
je 0x409ccf
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
add ecx, edi
jmp 0x409cd4
mov ecx, 8
cmp ecx, esi
mov eax, esi
cmovg eax, ecx
mov ecx, ebx
push eax
call fcn.0041a620
mov ecx, dword [esp + 0x1c]
mov dword [ebx], esi
mov esi, dword [ebp + 0x78]
mov eax, dword [esi]
test eax, eax
je 0x409d30
shl eax, 2
push eax
mov eax, dword [ebp + 0x74]
push dword [esi + 8]
mov eax, dword [eax + 8]
lea eax, [eax + ecx*4]
push eax
call fcn.0044efb0
mov ecx, dword [esi + 4]
add esp, 0xc
test ecx, ecx
jns 0x409d2a
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.0041a620
mov dword [esi], 0
cmp dword [ebp + 0x38], 0
je 0x409dad
push str.Foreground
mov edx, 1
mov ecx, ebp
call fcn.00407280
mov esi, dword [ebp + 0x74]
mov edi, eax
add esp, 4
mov eax, dword [edi]
test eax, eax
je 0x409dad
cmp eax, 1
jne 0x409d69
mov eax, dword [edi + 8]
cmp dword [eax + 0x1c], 0
jne 0x409d69
cmp dword [eax + 0x20], 0
je 0x409dad
mov ebx, dword [esi]
mov ecx, dword [esi + 4]
cmp ebx, ecx
jne 0x409d94
inc ebx
test ecx, ecx
je 0x409d82
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x409d87
mov eax, 8
cmp eax, ebx
mov ecx, esi
cmovg ebx, eax
push ebx
call fcn.0041a620
mov ecx, dword [esi]
mov eax, dword [esi + 8]
mov dword [eax + ecx*4], edi
inc dword [esi]
inc dword [ebp + 0x40]
mov eax, dword [edi + 0x18]
add dword [ebp + 0x48], eax
mov eax, dword [edi + 0xc]
add dword [ebp + 0x44], eax
mov edi, dword [ebp + 0x54]
mov eax, dword [ebp + 0x4c]
lea ebx, [edi + eax*4]
cmp edi, ebx
je 0x409df2
nop word [eax + eax]
mov esi, dword [edi]
mov ecx, dword [esi]
test ecx, ecx
jle 0x409deb
lea eax, [ecx + ecx*4]
shl eax, 3
nop
mov edx, dword [esi + 8]
cmp dword [eax + edx - 0xc], 0
jne 0x409deb
cmp dword [eax + edx - 8], 0
jne 0x409deb
dec ecx
sub eax, 0x28
mov dword [esi], ecx
test ecx, ecx
jg 0x409dd0
add edi, 4
cmp edi, ebx
jne 0x409dc0
mov ebx, dword [esp + 0x14]
mov eax, dword [ebp + 0x48]
mov ecx, dword [esp + 0x18]
add ecx, 4
add dword [ebx + 0xa0], eax
mov eax, dword [ebp + 0x44]
add dword [ebx + 0xa4], eax
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x20]
jne 0x409ca5
mov eax, dword [ebx + 0x5df4]
mov esi, dword [ebx + 0x5dfc]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x409e4a
cmp dword [esi + 4], 5
jne 0x409e43
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x409e33
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c777
add esp, 0x1c
ret