Function at 0x40c510
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x4371bb
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x444e3c]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor ebx, ebx
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x20]
mov dword [esp + 0x30], ecx
mov ecx, dword [esi + 0x28]
xor edi, edi
cmp byte [esi + 0x8d], bl
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
je 0x40c5c7
call fcn.00401d20
cmp dword [eax], 1
je 0x40c582
call fcn.00401d20
cmp dword [eax], 2
jne 0x40c59b
lea edx, [esp + 0x14]
push edx
push esi
push 0x407820
mov dword [esp + 0x20], ebx
call fcn.0040dc20
add esp, 0xc
mov edi, eax
push 0xdbba0
push ebx
lea eax, [esp + 0x34]
push eax
push 5
call ebp
cmp eax, 4
ja case.0x40c5b3.52
jmp dword [eax*4 + 0x40c794]
cmp edi, ebx
je 0x40c5da
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c5da
cmp byte [esi + 0x30], bl
je 0x40c5da
mov ecx, dword [esi]
push 0x43ad0c
push 0xc
call fcn.00406100
push 0x788
mov byte [esi + 0x8d], bl
call fcn.00416c0d
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, ebx
mov dword [esp + 0x48], ebx
je 0x40c602
mov ecx, eax
call fcn.00404690
jmp 0x40c604
xor eax, eax
mov ecx, dword [esi + 0x80]
push ecx
mov ecx, eax
mov dword [esp + 0x4c], 0xffffffff
mov dword [esi + 0x54], eax
call fcn.00404940
test al, al
jne 0x40c661
push str.ERROR_:_Cant_connect_to_the_http___DSLControl_line_781_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.Failed_in_m_DownloadTool__Init__
call fcn.00405da0
mov ecx, dword [esi + 0x54]
add esp, 4
cmp ecx, ebx
je 0x40c648
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [esi + 0x54], ebx
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
lea ecx, [esp + 0x18]
push ecx
push esi
push 0x40bb00
mov dword [esp + 0x24], ebx
call fcn.0040dc20
mov edi, eax
add esp, 0xc
cmp edi, ebx
je 0x40c64b
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x24]
push 0x36ee80
push ebx
lea ecx, [esp + 0x28]
push ecx
push 3
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], eax
call ebp
cmp eax, 2
ja 0x40c737
je 0x40c6fa
sub eax, ebx
je 0x40c6d0
sub eax, 1
jne 0x40c73e
push str.DownloadNewItems_:_DownloadTh_finished___
call fcn.00405da0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp case.0x40c5b3.52
push str.DownloadNewItems_:_m_hStopEvent_was_Signaled___
call fcn.00405da0
mov ecx, dword [esi + 0x54]
add esp, 4
call fcn.00404900
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp case.0x40c5b3.52
push str.DownloadNewItems_:_m_hClientReplayCANCELPBAR_was_Signaled___
call fcn.00405da0
mov ecx, dword [esi + 0x54]
add esp, 4
call fcn.00404900
lea ebp, [esi + 0x68]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x84]
push 0x3a98
push ebx
push edx
call fcn.00421410
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40c6e5
cmp eax, 0x102
je 0x40c74d
push str.Error___exit_from_WaitForMultipleObjects_with_unknown_handle___
call fcn.00405da0
add esp, 4
jmp case.0x40c5b3.52
push str.DownloadNewItems_:_Timeout___
call fcn.00405da0
mov eax, dword [esi + 0x10]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov al, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret