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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x447040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [0x4474b8]
push esi
push edi
mov dword [ebp - 0x10], ebx
mov eax, dword [ebx + 0x3f74]
cmp eax, dword [ebx + 0x3f70]
je 0x40a7bf
call fcn.0040a200
mov eax, dword [ebx + 0x3f70]
cmp dword [ebx + 0x3f78], eax
je 0x40ac39
mov dword [ebx + 0x3f78], eax
mov dword [ebx + 0x98], 0
mov eax, dword [ebx + 0x5108]
mov esi, dword [ebx + 0x5110]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x40a80e
cmp dword [esi + 4], 4
jne 0x40a807
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x40a7f7
mov ecx, dword [ebx + 0x4ad4]
mov eax, dword [ebx + 0x4acc]
mov dword [ebp - 8], ecx
lea eax, [ecx + eax*4]
mov dword [ebp - 0xc], eax
cmp ecx, eax
je 0x40a969
nop dword [eax + eax]
mov esi, dword [ecx]
mov ebx, dword [0x4474b8]
lea edi, [esi + 0x50]
lea eax, [esi + 0x80]
mov dword [esi + 0x78], edi
mov dword [esi + 0x7c], eax
mov ecx, dword [edi + 4]
test ecx, ecx
jns 0x40a866
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.0041b8f0
mov dword [edi], 0
mov edi, dword [esi + 0x7c]
mov ecx, dword [edi + 4]
test ecx, ecx
jns 0x40a88e
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.0041b8f0
mov dword [edi], 0
mov byte [esi + 0x40], 1
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], ecx
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x64], eax
mov dword [esi + 0x68], ecx
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x40]
mov dword [esi + 0x6c], eax
mov dword [esi + 0x70], ecx
mov dword [esi + 0x74], esi
cmp dword [esi + 0x38], 0
je 0x40a954
push str.Background
xor edx, edx
mov ecx, esi
call fcn.00407db0
mov edi, dword [esi + 0x78]
mov ebx, eax
add esp, 4
mov eax, dword [ebx]
test eax, eax
je 0x40a954
cmp eax, 1
jne 0x40a90a
mov eax, dword [ebx + 8]
cmp dword [eax + 0x1c], 0
jne 0x40a90a
cmp dword [eax + 0x20], 0
je 0x40a954
mov edx, dword [edi]
mov ecx, dword [edi + 4]
cmp edx, ecx
jne 0x40a93b
inc edx
mov dword [ebp - 0x14], edx
test ecx, ecx
je 0x40a929
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0x14]
sar eax, 1
add eax, ecx
jmp 0x40a92e
mov eax, 8
cmp eax, edx
mov ecx, edi
cmovg edx, eax
push edx
call fcn.0041b8f0
mov ecx, dword [edi]
mov eax, dword [edi + 8]
mov dword [eax + ecx*4], ebx
inc dword [edi]
inc dword [esi + 0x44]
mov eax, dword [ebx + 0x18]
add dword [esi + 0x4c], eax
mov eax, dword [ebx + 0xc]
add dword [esi + 0x48], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
cmp ecx, dword [ebp - 0xc]
jne 0x40a830
mov ebx, dword [ebp - 0x10]
call fcn.00409dd0
mov eax, dword [ebx + 0x4ca4]
test eax, eax
je 0x40a992
test dword [eax + 0xc], 0x2000
jne 0x40a992
mov edi, dword [eax + 0x314]
mov ebx, dword [ebx + 0x4cac]
mov dword [ebp - 0x1c], edi
jmp 0x40a9a5
xor edi, edi
mov dword [ebp - 0x1c], edi
test eax, eax
je 0x40a9a3
mov ebx, dword [ebx + 0x4cac]
jmp 0x40a9a5
xor ebx, ebx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], ebx
mov esi, dword [eax + 0x3fc0]
mov eax, dword [eax + 0x3fb8]
lea eax, [esi + eax*4]
mov dword [ebp - 0xc], eax
cmp esi, eax
je 0x40a9fd
mov ecx, dword [esi]
cmp byte [ecx + 0xba], 0
je 0x40a9f6
cmp byte [ecx + 0xc2], 0
jne 0x40a9f6
mov edx, dword [ecx + 0xc]
test edx, 0x1000000
jne 0x40a9f6
cmp ecx, edi
je 0x40a9f6
cmp ecx, ebx
je 0x40a9f6
shr edx, 0x19
and edx, 1
call fcn.004099e0
mov eax, dword [ebp - 0xc]
add esi, 4
cmp esi, eax
jne 0x40a9c1
xor esi, esi
nop
mov ecx, dword [ebp + esi*4 - 0x1c]
test ecx, ecx
je 0x40aa28
cmp byte [ecx + 0xba], 0
je 0x40aa28
cmp byte [ecx + 0xc2], 0
jne 0x40aa28
mov edx, dword [ecx + 0xc]
shr edx, 0x19
and edx, 1
call fcn.004099e0
inc esi
cmp esi, 2
jl 0x40aa00
mov ebx, dword [ebp - 0x10]
cmp byte [ebx + 0x44], 0
je 0x40aa61
mov ecx, dword [ebx + 0x4ebc]
cmp ecx, 0xffffffff
je 0x40aa61
push dword [ebx + 0xb0]
movss xmm0, dword [ebx + 0x39a8]
push dword [ebx + 0xac]
sub esp, 8
call fcn.00403f10
add esp, 0x10
mov dword [ebx + 0x94], 0
mov dword [ebx + 0x90], 0
mov ecx, dword [ebx + 0x4ad4]
mov eax, dword [ebx + 0x4acc]
mov dword [ebp - 0x14], ecx
lea eax, [ecx + eax*4]
mov dword [ebp - 0x18], eax
cmp ecx, eax
je 0x40ac0c
mov ecx, dword [ecx]
mov dword [ebp - 8], ecx
mov ebx, dword [ecx + 0x78]
mov eax, dword [ecx + 0x7c]
mov edx, dword [ebx]
mov esi, dword [eax]
mov edi, dword [ebx + 4]
add esi, edx
mov dword [ebp - 0xc], edx
cmp esi, edi
jle 0x40aad8
test edi, edi
je 0x40aabe
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
add ecx, edi
jmp 0x40aac3
mov ecx, 8
cmp ecx, esi
mov eax, esi
cmovg eax, ecx
mov ecx, ebx
push eax
call fcn.0041b8f0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [ebx], esi
mov esi, dword [ecx + 0x7c]
mov eax, dword [esi]
test eax, eax
je 0x40ab24
shl eax, 2
push eax
mov eax, dword [ecx + 0x78]
push dword [esi + 8]
mov eax, dword [eax + 8]
lea eax, [eax + edx*4]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esi + 4]
add esp, 0xc
test ecx, ecx
jns 0x40ab1b
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.0041b8f0
mov ecx, dword [ebp - 8]
mov dword [esi], 0
cmp dword [ecx + 0x3c], 0
je 0x40aba5
push str.Foreground
mov edx, 1
call fcn.00407db0
mov ecx, dword [ebp - 8]
mov ebx, eax
add esp, 4
mov eax, dword [ebx]
mov esi, dword [ecx + 0x78]
test eax, eax
je 0x40aba5
cmp eax, 1
jne 0x40ab5e
mov eax, dword [ebx + 8]
cmp dword [eax + 0x1c], 0
jne 0x40ab5e
cmp dword [eax + 0x20], 0
je 0x40aba5
mov edi, dword [esi]
mov ecx, dword [esi + 4]
cmp edi, ecx
jne 0x40ab89
inc edi
test ecx, ecx
je 0x40ab77
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x40ab7c
mov eax, 8
cmp eax, edi
mov ecx, esi
cmovg edi, eax
push edi
call fcn.0041b8f0
mov ecx, dword [esi]
mov eax, dword [esi + 8]
mov dword [eax + ecx*4], ebx
mov ecx, dword [ebp - 8]
inc dword [esi]
inc dword [ecx + 0x44]
mov eax, dword [ebx + 0x18]
add dword [ecx + 0x4c], eax
mov eax, dword [ebx + 0xc]
add dword [ecx + 0x48], eax
mov edi, dword [ecx + 0x58]
mov eax, dword [ecx + 0x50]
lea ebx, [edi + eax*4]
cmp edi, ebx
je 0x40abe5
mov esi, dword [edi]
mov ecx, dword [esi]
test ecx, ecx
jle 0x40abdb
lea eax, [ecx + ecx*4]
shl eax, 3
mov edx, dword [esi + 8]
cmp dword [edx + eax - 0xc], 0
jne 0x40abdb
cmp dword [edx + eax - 8], 0
jne 0x40abdb
dec ecx
sub eax, 0x28
mov dword [esi], ecx
test ecx, ecx
jg 0x40abc0
add edi, 4
cmp edi, ebx
jne 0x40abb2
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x4c]
add dword [ebx + 0x90], eax
mov eax, dword [ecx + 0x48]
mov ecx, dword [ebp - 0x14]
add dword [ebx + 0x94], eax
add ecx, 4
mov dword [ebp - 0x14], ecx
cmp ecx, dword [ebp - 0x18]
jne 0x40aa92
mov eax, dword [ebx + 0x5108]
mov esi, dword [ebx + 0x5110]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x40ac39
cmp dword [esi + 4], 5
jne 0x40ac32
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x40ac22
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043bca4
mov esp, ebp
pop ebp
ret