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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x46d040]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov edi, dword [0x508b7c]
mov dword [esp + 0x28], edi
mov eax, dword [edi + 0x3dcc]
cmp eax, dword [edi + 0x3dc8]
je 0x4204a4
call fcn.004201a0
mov eax, dword [edi + 0x3dd0]
mov edx, 4
mov dword [esp + 0x24], eax
mov ecx, edi
mov eax, dword [edi + 0x3dc8]
mov dword [esp + 0x18], eax
mov dword [edi + 0x3dd0], eax
mov dword [edi + 0xa8], 0
call fcn.0041c270
cmp dword [edi + 0x3fd0], 0
mov dword [esp + 0x10], 0
je 0x4205a8
xor edx, edx
mov dword [esp + 0x14], edx
nop
mov eax, dword [edi + 0x3fd8]
mov ebx, 2
mov eax, dword [edx + eax]
mov dword [esp + 0x1c], eax
lea esi, [eax + 0x64]
push 0
mov ecx, esi
call fcn.0042f2c0
add esi, 0xc
sub ebx, 1
jne 0x420505
mov esi, dword [esp + 0x1c]
cmp dword [esi + 0x30], ebx
je 0x420588
push str.Background
xor edx, edx
mov ecx, esi
call fcn.0041c2f0
add esp, 4
mov dword [esp + 0x1c], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x420588
cmp ecx, 1
jne 0x42054c
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], ebx
jne 0x42054c
cmp dword [ecx + 0x20], ebx
je 0x420588
mov ecx, dword [esi + 0x68]
lea ebx, [esi + 0x64]
mov esi, dword [ebx]
cmp esi, ecx
jne 0x42057a
inc esi
test ecx, ecx
je 0x420568
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x42056d
mov eax, 8
cmp eax, esi
mov ecx, ebx
cmovg esi, eax
push esi
call fcn.0042f0d0
mov ecx, dword [ebx]
mov eax, dword [ebx + 8]
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4], edx
inc dword [ebx]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
inc ecx
add edx, 4
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
cmp ecx, dword [edi + 0x3fd0]
jne 0x4204f0
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x18]
je 0x4205b7
call fcn.0041fdb0
mov ecx, dword [edi + 0x412c]
test ecx, ecx
je 0x4205e0
test dword [ecx + 8], 0x2000
jne 0x4205e0
mov eax, dword [ecx + 0x2e8]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x4134]
jmp 0x4205f8
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x4205f6
mov eax, dword [edi + 0x4134]
jmp 0x4205f8
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
cmp dword [edi + 0x3de0], ebx
je 0x420659
xor esi, esi
nop dword [eax]
mov eax, dword [edi + 0x3de8]
mov ecx, dword [esi + eax]
cmp byte [ecx + 0x8e], 0
je 0x42064d
cmp byte [ecx + 0x95], 0
jne 0x42064d
mov edx, dword [ecx + 8]
test edx, 0x1000000
jne 0x42064d
cmp ecx, dword [esp + 0x14]
je 0x42064d
cmp ecx, dword [esp + 0x10]
je 0x42064d
shr edx, 0x19
and edx, 1
call fcn.0041f960
inc ebx
add esi, 4
cmp ebx, dword [edi + 0x3de0]
jne 0x420610
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [esp + esi*4 + 0x1c]
test ecx, ecx
je 0x420688
cmp byte [ecx + 0x8e], 0
je 0x420688
cmp byte [ecx + 0x95], 0
jne 0x420688
mov edx, dword [ecx + 8]
shr edx, 0x19
and edx, 1
call fcn.0041f960
inc esi
cmp esi, 2
jl 0x420660
cmp byte [edi + 0x60], 0
je 0x4206c8
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x18]
je 0x4206c8
mov ecx, dword [edi + 0x4158]
cmp ecx, 0xffffffff
je 0x4206c8
push dword [edi + 0xdbc]
movss xmm0, dword [edi + 0x3850]
push dword [edi + 0xdb8]
sub esp, 8
call fcn.0041b030
add esp, 0x10
cmp dword [edi + 0x3fd0], 0
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa0], 0
mov dword [esp + 0x14], 0
jle 0x4208a9
xor ecx, ecx
mov dword [esp + 0x10], ecx
nop word [eax + eax]
mov eax, dword [edi + 0x3fd8]
mov esi, dword [ecx + eax]
mov ecx, dword [esi + 0x64]
mov eax, dword [esi + 0x70]
add eax, ecx
mov dword [esp + 0x1c], ecx
push eax
lea ecx, [esi + 0x64]
call fcn.0042f2c0
mov eax, dword [esi + 0x70]
test eax, eax
je 0x420749
mov ecx, dword [esp + 0x1c]
shl eax, 2
push eax
mov eax, dword [esi + 0x6c]
push dword [esi + 0x78]
lea eax, [eax + ecx*4]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea ecx, [esi + 0x70]
push 0
call fcn.0042f2c0
cmp dword [esi + 0x34], 0
je 0x4207c6
push str.Foreground
mov edx, 1
mov ecx, esi
call fcn.0041c2f0
add esp, 4
mov dword [esp + 0x18], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x4207c6
cmp ecx, 1
jne 0x420781
mov ecx, dword [eax + 8]
cmp dword [ecx + 0x1c], 0
jne 0x420781
cmp dword [ecx + 0x20], 0
je 0x4207c6
mov edx, dword [esi + 0x64]
mov ecx, dword [esi + 0x68]
cmp edx, ecx
jne 0x4207b6
inc edx
mov dword [esp + 0x1c], edx
test ecx, ecx
je 0x4207a3
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 1
add eax, ecx
jmp 0x4207a8
mov eax, 8
cmp eax, edx
lea ecx, [esi + 0x64]
cmovg edx, eax
push edx
call fcn.0042f0d0
mov ecx, dword [esi + 0x64]
mov eax, dword [esi + 0x6c]
mov edx, dword [esp + 0x18]
mov dword [eax + ecx*4], edx
inc dword [esi + 0x64]
mov byte [esi + 0x38], 1
lea edx, [esi + 0x6c]
cmp dword [esi + 0x64], 0
mov dword [esp + 0x24], edx
jle 0x4207db
mov eax, dword [edx]
jmp 0x4207dd
xor eax, eax
mov dword [esi + 0x48], eax
xor ebx, ebx
mov eax, dword [esi + 0x64]
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov dword [esi + 0x50], ecx
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x58], ecx
mov ecx, dword [0x508b7c]
mov dword [esi + 0x54], eax
mov eax, dword [ecx + 0x58]
mov ecx, dword [ecx + 0x5c]
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], ecx
cmp dword [esi + 0x64], ebx
jle 0x42087a
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov edi, ecx
nop dword [eax]
mov eax, dword [edx]
mov edx, dword [ecx + eax]
mov eax, dword [edx]
test eax, eax
je 0x420852
mov ebx, dword [edx + 8]
lea ecx, [eax + eax*4]
cmp dword [ebx + ecx*8 - 0xc], 0
jne 0x420852
cmp dword [ebx + ecx*8 - 8], 0
jne 0x420852
dec eax
mov dword [edx], eax
mov ebx, dword [edx + 0x18]
inc edi
add ebx, dword [esi + 0x44]
mov ecx, dword [esp + 0x18]
mov dword [esi + 0x44], ebx
add ecx, 4
mov eax, dword [edx + 0xc]
add dword [esi + 0x40], eax
mov edx, dword [esp + 0x24]
mov dword [esp + 0x18], ecx
cmp edi, dword [esi + 0x64]
jl 0x420830
mov edi, dword [esp + 0x28]
add dword [edi + 0xa0], ebx
mov eax, dword [esi + 0x40]
add dword [edi + 0xa4], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
add ecx, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
cmp eax, dword [edi + 0x3fd0]
jl 0x420700
xor esi, esi
cmp dword [edi + 0x524c], esi
jle 0x4208e4
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [edi + 0x5254]
add eax, ebx
cmp dword [eax + 4], 5
jne 0x4208d8
push eax
mov eax, dword [eax + 0xc]
push edi
call eax
add esp, 8
inc esi
add ebx, 0x14
cmp esi, dword [edi + 0x524c]
jl 0x4208c0
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045caa8
mov esp, ebp
pop ebp
ret