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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x508040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x57ecb0]
push edi
mov dword [ebp - 0x20], esi
mov eax, dword [esi + 0x3dfc]
cmp eax, dword [esi + 0x3df8]
je 0x40ea8f
call fcn.0040e710
mov eax, dword [esi + 0x3e00]
xor edi, edi
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x3df8]
mov dword [ebp - 0x10], eax
mov dword [esi + 0x3e00], eax
mov dword [esi + 0xa0], 0
cmp dword [esi + 0x5268], edi
jle 0x40eae4
xor ebx, ebx
nop dword [eax]
mov eax, dword [esi + 0x5270]
add eax, ebx
cmp dword [eax + 4], 4
jne 0x40ead8
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x5268]
jl 0x40eac0
cmp dword [esi + 0x4008], 0
mov dword [ebp - 8], 0
je 0x40ebb0
xor edx, edx
mov dword [ebp - 0xc], edx
nop dword [eax]
mov eax, dword [esi + 0x4010]
mov ebx, 2
mov eax, dword [edx + eax]
mov dword [ebp - 0x14], eax
lea edi, [eax + 0x64]
push 0
mov ecx, edi
call fcn.0041bef0
add edi, 0xc
sub ebx, 1
jne 0x40eb14
mov edi, dword [ebp - 0x14]
cmp dword [edi + 0x30], ebx
je 0x40eb94
push str.Background
xor edx, edx
mov ecx, edi
call fcn.0040ad50
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40eb94
cmp ecx, 1
jne 0x40eb59
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], ebx
jne 0x40eb59
cmp dword [ecx + 0x20], ebx
je 0x40eb94
mov ecx, dword [edi + 0x68]
lea ebx, [edi + 0x64]
mov edi, dword [ebx]
cmp edi, ecx
jne 0x40eb87
inc edi
test ecx, ecx
je 0x40eb75
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x40eb7a
mov eax, 8
cmp eax, edi
mov ecx, ebx
cmovg edi, eax
push edi
call fcn.0041be70
mov ecx, dword [ebx]
mov eax, dword [ebx + 8]
mov edx, dword [ebp - 0x14]
mov dword [eax + ecx*4], edx
inc dword [ebx]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
inc ecx
add edx, 4
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], edx
cmp ecx, dword [esi + 0x4008]
jne 0x40eb00
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
je 0x40ebbd
call fcn.0040e320
mov ecx, dword [esi + 0x4164]
test ecx, ecx
je 0x40ebe4
test dword [ecx + 8], 0x2000
jne 0x40ebe4
mov eax, dword [ecx + 0x2e8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x416c]
jmp 0x40ebfa
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40ebf8
mov eax, dword [esi + 0x416c]
jmp 0x40ebfa
xor eax, eax
xor ebx, ebx
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
cmp dword [esi + 0x3e10], ebx
je 0x40ec57
xor edi, edi
nop dword [eax]
mov eax, dword [esi + 0x3e18]
mov ecx, dword [edi + eax]
cmp byte [ecx + 0x8e], 0
je 0x40ec4b
cmp byte [ecx + 0x95], 0
jne 0x40ec4b
mov edx, dword [ecx + 8]
test edx, 0x1000000
jne 0x40ec4b
cmp ecx, dword [ebp - 0xc]
je 0x40ec4b
cmp ecx, dword [ebp - 8]
je 0x40ec4b
shr edx, 0x19
and edx, 1
call fcn.0040df50
inc ebx
add edi, 4
cmp ebx, dword [esi + 0x3e10]
jne 0x40ec10
xor edi, edi
nop dword [eax]
mov ecx, dword [ebp + edi*4 - 0x18]
test ecx, ecx
je 0x40ec88
cmp byte [ecx + 0x8e], 0
je 0x40ec88
cmp byte [ecx + 0x95], 0
jne 0x40ec88
mov edx, dword [ecx + 8]
shr edx, 0x19
and edx, 1
call fcn.0040df50
inc edi
cmp edi, 2
jl 0x40ec60
cmp byte [esi + 0x58], 0
je 0x40ecc6
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
je 0x40ecc6
mov ecx, dword [esi + 0x4180]
cmp ecx, 0xffffffff
je 0x40ecc6
push dword [esi + 0xd54]
movss xmm0, dword [esi + 0x3868]
push dword [esi + 0xd50]
sub esp, 8
call fcn.00409b20
add esp, 0x10
cmp dword [esi + 0x4008], 0
mov dword [esi + 0x9c], 0
mov dword [esi + 0x98], 0
mov dword [ebp - 0xc], 0
jle 0x40ee89
xor ecx, ecx
mov dword [ebp - 8], ecx
mov eax, dword [esi + 0x4010]
mov edi, dword [ecx + eax]
mov ecx, dword [edi + 0x64]
mov eax, dword [edi + 0x70]
add eax, ecx
mov dword [ebp - 0x14], ecx
push eax
lea ecx, [edi + 0x64]
call fcn.0041bef0
mov eax, dword [edi + 0x70]
test eax, eax
je 0x40ed3a
mov ecx, dword [ebp - 0x14]
shl eax, 2
push eax
mov eax, dword [edi + 0x6c]
push dword [edi + 0x78]
lea eax, [eax + ecx*4]
push eax
call fcn.004b2880
add esp, 0xc
lea ecx, [edi + 0x70]
push 0
call fcn.0041bef0
cmp dword [edi + 0x34], 0
je 0x40edb3
push str.Foreground
mov edx, 1
mov ecx, edi
call fcn.0040ad50
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40edb3
cmp ecx, 1
jne 0x40ed71
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], 0
jne 0x40ed71
cmp dword [ecx + 0x20], 0
je 0x40edb3
mov edx, dword [edi + 0x64]
mov ecx, dword [edi + 0x68]
cmp edx, ecx
jne 0x40eda4
inc edx
mov dword [ebp - 0x14], edx
test ecx, ecx
je 0x40ed91
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0x14]
sar eax, 1
add eax, ecx
jmp 0x40ed96
mov eax, 8
cmp eax, edx
lea ecx, [edi + 0x64]
cmovg edx, eax
push edx
call fcn.0041be70
mov ecx, dword [edi + 0x64]
mov eax, dword [edi + 0x6c]
mov edx, dword [ebp - 0x10]
mov dword [eax + ecx*4], edx
inc dword [edi + 0x64]
mov byte [edi + 0x38], 1
lea edx, [edi + 0x6c]
cmp dword [edi + 0x64], 0
mov dword [ebp - 0x1c], edx
jle 0x40edc7
mov eax, dword [edx]
jmp 0x40edc9
xor eax, eax
mov dword [edi + 0x48], eax
xor ebx, ebx
mov eax, dword [edi + 0x64]
mov dword [edi + 0x3c], eax
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
mov dword [edi + 0x50], ecx
mov dword [edi + 0x4c], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x10]
mov dword [edi + 0x58], ecx
mov ecx, dword [0x57ecb0]
mov dword [edi + 0x54], eax
mov eax, dword [ecx + 0x50]
mov ecx, dword [ecx + 0x54]
mov dword [edi + 0x5c], eax
mov dword [edi + 0x60], ecx
cmp dword [edi + 0x64], ebx
jle 0x40ee5e
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov esi, ecx
mov eax, dword [edx]
mov edx, dword [ecx + eax]
mov eax, dword [edx]
test eax, eax
je 0x40ee3a
mov ebx, dword [edx + 8]
lea ecx, [eax + eax*4]
cmp dword [ebx + ecx*8 - 0xc], 0
jne 0x40ee3a
cmp dword [ebx + ecx*8 - 8], 0
jne 0x40ee3a
dec eax
mov dword [edx], eax
mov ebx, dword [edx + 0x18]
inc esi
add ebx, dword [edi + 0x44]
mov ecx, dword [ebp - 0x10]
mov dword [edi + 0x44], ebx
add ecx, 4
mov eax, dword [edx + 0xc]
add dword [edi + 0x40], eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
cmp esi, dword [edi + 0x64]
jl 0x40ee18
mov esi, dword [ebp - 0x20]
add dword [esi + 0x98], ebx
mov eax, dword [edi + 0x40]
add dword [esi + 0x9c], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
inc eax
add ecx, 4
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ecx
cmp eax, dword [esi + 0x4008]
jl 0x40ecf3
xor edi, edi
cmp dword [esi + 0x5268], edi
jle 0x40eec4
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [esi + 0x5270]
add eax, ebx
cmp dword [eax + 4], 5
jne 0x40eeb8
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x5268]
jl 0x40eea0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004af2b0
mov esp, ebp
pop ebp
ret