Function at 0x420540
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4cc411
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x50d488]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x517370]
inc eax
mov dword [0x517370], eax
cmp eax, 4
jge 0x42058d
mov eax, dword [edi]
cmp dword [eax + 0x338], 0
je 0x42082b
mov eax, dword [edi]
mov byte [eax + 0x108], 1
mov ecx, dword [eax + 0xe4]
test ecx, ecx
je 0x4205a5
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 0x98
mov eax, dword [esi + 4]
test eax, eax
je 0x4205e1
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4205d5
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 4]
call ebx
mov dword [esi + 4], 0
mov ecx, dword [esi]
test ecx, ecx
je 0x4205f1
mov eax, dword [ecx]
call dword [eax]
mov dword [esi], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x420602
push eax
call ebx
mov dword [esi + 8], 0
mov eax, dword [edi]
cmp dword [eax + 0x338], 0
jne 0x4207ff
mov eax, dword [0x517344]
test eax, eax
jne 0x42064c
push 0x50
call fcn.00494625
add esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x68], 0
test eax, eax
je 0x42063d
mov ecx, eax
call fcn.0040d610
jmp 0x42063f
xor eax, eax
mov dword [esp + 0x68], 0xffffffff
mov dword [0x517344], eax
lea ecx, [esp + 0x44]
push ecx
mov ecx, eax
call fcn.0040d980
mov esi, dword [edi]
mov ebx, eax
add esi, 0x328
cmp esi, ebx
je 0x420691
cmp dword [esi + 0x14], 8
jb 0x420676
push dword [esi]
call fcn.00494620
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov ecx, esi
push ebx
mov word [esi], ax
call fcn.00406f40
cmp dword [esp + 0x58], 8
jb 0x4206a4
push dword [esp + 0x44]
call fcn.00494620
add esp, 4
mov eax, dword [edi]
lea edx, [eax + 0x328]
lea ecx, [eax + 0x340]
cmp ecx, edx
je 0x4206c0
push 0xffffffffffffffff
push 0
push edx
call fcn.00407640
push 0x13
xor eax, eax
mov dword [esp + 0x2c], 7
push str.download_defaultUrl
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
call fcn.00407010
mov dword [esp + 0x68], 1
mov eax, dword [0x51638c]
test eax, eax
jne 0x420739
push 0x540
call fcn.00494625
mov esi, eax
add esp, 4
mov dword [esp + 0x10], esi
mov byte [esp + 0x68], 2
test esi, esi
je 0x42072d
push 0x540
push 0
push esi
call fcn.0049e980
add esp, 0xc
mov ecx, esi
call fcn.00417830
jmp 0x42072f
xor eax, eax
mov byte [esp + 0x68], 1
mov dword [0x51638c], eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
call fcn.004199c0
mov ebx, eax
mov byte [esp + 0x68], 3
mov eax, dword [0x51638c]
test eax, eax
jne 0x420796
push 0x540
call fcn.00494625
mov esi, eax
add esp, 4
mov dword [esp + 0x10], esi
mov byte [esp + 0x68], 4
test esi, esi
je 0x42078a
push 0x540
push 0
push esi
call fcn.0049e980
add esp, 0xc
mov ecx, esi
call fcn.00417830
jmp 0x42078c
xor eax, eax
mov byte [esp + 0x68], 3
mov dword [0x51638c], eax
push ebx
lea ecx, [esp + 0x18]
push ecx
mov ecx, eax
call fcn.0041fb30
cmp dword [esp + 0x40], 8
jb 0x4207b6
push dword [esp + 0x2c]
call fcn.00494620
add esp, 4
xor eax, eax
mov dword [esp + 0x68], 0xffffffff
cmp dword [esp + 0x28], 8
mov dword [esp + 0x40], 7
mov dword [esp + 0x3c], 0
mov word [esp + 0x2c], ax
jb 0x4207e8
push dword [esp + 0x14]
call fcn.00494620
add esp, 4
xor eax, eax
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov word [esp + 0x14], ax
push dword [edi + 4]
mov ecx, dword [edi]
call fcn.00420ac0
mov esi, dword [edi]
mov eax, dword [esi + 0x38c]
test eax, eax
je 0x42082b
mov ecx, dword [0x516384]
push eax
call fcn.0040cb70
mov dword [esi + 0x38c], 0
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret