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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x45100c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x451660]
push edi
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x3dc4]
cmp eax, dword [esi + 0x3dc0]
je 0x40b6af
call fcn.0040b370
mov eax, dword [esi + 0x3dc8]
xor edi, edi
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x3dc0]
mov dword [ebp - 8], eax
mov dword [esi + 0x3dc8], eax
mov dword [esi + 0xa0], 0
cmp dword [esi + 0x5238], edi
jle 0x40b704
xor ebx, ebx
nop dword [eax]
mov eax, dword [esi + 0x5240]
add eax, ebx
cmp dword [eax + 4], 4
jne 0x40b6f8
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x5238]
jl 0x40b6e0
xor ecx, ecx
mov dword [ebp - 0x14], ecx
cmp dword [esi + 0x3fc8], ecx
je 0x40b7c7
nop word [eax + eax]
mov eax, dword [esi + 0x3fd0]
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.004182b0
add edi, 0xc
sub ebx, 1
jne 0x40b734
mov edi, dword [ebp - 0xc]
cmp dword [edi + 0x30], ebx
je 0x40b7b4
push str.Background
xor edx, edx
mov ecx, edi
call fcn.004076c0
add esp, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40b7b4
cmp ecx, 1
jne 0x40b779
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], ebx
jne 0x40b779
cmp dword [ecx + 0x20], ebx
je 0x40b7b4
mov ecx, dword [edi + 0x68]
lea ebx, [edi + 0x64]
mov edi, dword [ebx]
cmp edi, ecx
jne 0x40b7a7
inc edi
test ecx, ecx
je 0x40b795
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x40b79a
mov eax, 8
cmp eax, edi
mov ecx, ebx
cmovg edi, eax
push edi
call fcn.00418230
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 + 0x3fc8]
jne 0x40b720
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
je 0x40b7d4
call fcn.0040af70
mov eax, dword [esi + 0x4124]
test eax, eax
je 0x40b7f8
test dword [eax + 8], 0x2000
jne 0x40b7f8
mov ebx, dword [eax + 0x2e8]
mov eax, dword [esi + 0x412c]
mov dword [ebp - 0x10], ebx
jmp 0x40b80b
xor ebx, ebx
mov dword [ebp - 0x10], ebx
test eax, eax
je 0x40b809
mov eax, dword [esi + 0x412c]
jmp 0x40b80b
xor eax, eax
xor edi, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
cmp dword [esi + 0x3dd8], edi
je 0x40b863
nop dword [eax + eax]
mov eax, dword [esi + 0x3de0]
mov ecx, dword [eax + edi*4]
cmp byte [ecx + 0x8e], 0
je 0x40b85a
cmp byte [ecx + 0x95], 0
jne 0x40b85a
mov edx, dword [ecx + 8]
test edx, 0x1000000
jne 0x40b85a
cmp ecx, ebx
je 0x40b85a
cmp ecx, dword [ebp - 0x14]
je 0x40b85a
shr edx, 0x19
and edx, 1
call fcn.0040ab90
inc edi
cmp edi, dword [esi + 0x3dd8]
jne 0x40b820
xor edi, edi
mov ecx, dword [ebp + edi*4 - 0x10]
test ecx, ecx
je 0x40b88d
cmp byte [ecx + 0x8e], 0
je 0x40b88d
cmp byte [ecx + 0x95], 0
jne 0x40b88d
mov edx, dword [ecx + 8]
shr edx, 0x19
and edx, 1
call fcn.0040ab90
inc edi
cmp edi, 2
jl 0x40b865
cmp byte [esi + 0x58], 0
je 0x40b8cb
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
je 0x40b8cb
mov ecx, dword [esi + 0x4150]
cmp ecx, 0xffffffff
je 0x40b8cb
push dword [esi + 0xdb4]
movss xmm0, dword [esi + 0x3848]
push dword [esi + 0xdb0]
sub esp, 8
call fcn.004065c0
add esp, 0x10
xor ecx, ecx
mov dword [esi + 0x9c], 0
mov dword [esi + 0x98], 0
mov dword [ebp - 0x18], ecx
cmp dword [esi + 0x3fc8], ecx
jle 0x40ba79
mov eax, dword [esi + 0x3fd0]
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.004182b0
mov eax, dword [ebx + 0x70]
test eax, eax
je 0x40b937
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.004182b0
cmp dword [ebx + 0x34], 0
je 0x40b9b0
push str.Foreground
mov edx, 1
mov ecx, ebx
call fcn.004076c0
add esp, 4
mov dword [ebp - 8], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40b9b0
cmp ecx, 1
jne 0x40b96e
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], 0
jne 0x40b96e
cmp dword [ecx + 0x20], 0
je 0x40b9b0
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x68]
cmp edx, ecx
jne 0x40b9a1
inc edx
mov dword [ebp - 0xc], edx
test ecx, ecx
je 0x40b98e
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0xc]
sar eax, 1
add eax, ecx
jmp 0x40b993
mov eax, 8
cmp eax, edx
lea ecx, [ebx + 0x64]
cmovg edx, eax
push edx
call fcn.00418230
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 [0x451660]
mov byte [ebx + 0x38], 1
cmp dword [ebx + 0x64], 0
jle 0x40b9c5
mov eax, dword [ebx + 0x6c]
jmp 0x40b9c7
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 + 0x50]
mov ecx, dword [edx + 0x54]
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 0x40ba57
nop
mov eax, dword [ebx + 0x6c]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx]
test eax, eax
je 0x40ba33
mov esi, dword [edx + 8]
lea ecx, [eax + eax*4]
cmp dword [esi + ecx*8 - 0xc], 0
jne 0x40ba33
cmp dword [esi + ecx*8 - 8], 0
jne 0x40ba33
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 0x40ba10
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
add dword [esi + 0x98], eax
inc ecx
mov eax, dword [ebx + 0x40]
add dword [esi + 0x9c], eax
mov dword [ebp - 0x18], ecx
cmp ecx, dword [esi + 0x3fc8]
jl 0x40b8f0
xor edi, edi
cmp dword [esi + 0x5238], edi
jle 0x40bab4
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [esi + 0x5240]
add eax, ebx
cmp dword [eax + 4], 5
jne 0x40baa8
push eax
mov eax, dword [eax + 0xc]
push esi
call eax
add esp, 8
inc edi
add ebx, 0x14
cmp edi, dword [esi + 0x5238]
jl 0x40ba90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00443af3
mov esp, ebp
pop ebp
ret