Function at 0x406eec
Capabilities:
Resolve dns

Disassembly:
mov eax, 0x41d8f4
call fcn.004128c4
sub esp, 0x28
mov eax, dword [0x4280c8]
push ebx
push esi
push edi
push str.CDownloadThread::Download_3_n
mov dword [ebp - 0x10], eax
mov esi, ecx
call fcn.0040b1f8
mov eax, dword [0x4291ac]
pop ecx
mov edi, 0x4291ac
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [0x4291ac]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 8]
add eax, 0x34
push eax
mov byte [ebp - 4], 1
call fcn.0040792f
mov eax, dword [0x4291ac]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 2
mov eax, dword [0x4291ac]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
mov byte [ebp - 4], 3
call fcn.00406d2f
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00406d2f
push dword [ebp - 0x28]
push dword [ebp - 0x24]
push str.CDownloadThread::Download__S__S_n
call fcn.0040b1f8
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 0xc
cmp dword [0x42a308], 1
jbe 0x40701a
mov ebx, 0x42a310
push ebx
mov word [0x429e30], 2
call edi
cmp eax, 0xffffffff
mov dword [0x429e34], eax
jne 0x406ff5
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x406fe9
or ebx, 0xffffffff
jmp 0x407142
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [0x429e34], eax
xor eax, eax
mov ax, word [0x42a30c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
and dword [0x429e38], 0
and dword [0x429e3c], 0
mov word [0x429e32], ax
xor ebx, ebx
push dword [0x42a308]
push str.CDownloadThread::Download_g_ProxyInfo.dwProxyType_d_n
call fcn.0040b1f8
cmp dword [0x42a308], 2
mov eax, dword [ebp - 0x34]
pop ecx
pop ecx
mov word [ebp - 0x1e], ax
je 0x4070a1
push eax
mov word [ebp - 0x20], 2
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp - 0x24]
mov word [ebp - 0x1e], ax
call edi
push eax
push str.CDownloadThread::Download_S_addr_d_n
mov dword [ebp - 0x1c], eax
call fcn.0040b1f8
cmp dword [ebp - 0x1c], 0xffffffff
pop ecx
pop ecx
jne 0x40709b
push dword [ebp - 0x24]
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x407091
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp - 0x24]
push str.CDownloadThread::Download_gethostbyname__S____d_n
call fcn.0040b1f8
add esp, 0xc
jmp 0x406fe1
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
movzx eax, word [ebp - 0x1e]
push eax
push str.CDownloadThread::Download_addr.sin_port_u_n
call fcn.0040b1f8
pop ecx
pop ecx
push ebx
push ebx
push dword [esi + 0x3c]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push eax
push str.CDownloadThread::Download_m_socket___d_n
mov dword [esi + 0x30], eax
call fcn.0040b1f8
pop ecx
pop ecx
push dword [ebp - 0x28]
lea eax, [ebp - 0x20]
push dword [ebp - 0x24]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call fcn.004064d1
mov edi, eax
push edi
push str.CDownloadThread::Download_DoMyTask_return__d_n
call fcn.0040b1f8
pop ecx
pop ecx
mov eax, esi
call fcn.00406330
push ebx
call fcn.00402cdc
test eax, eax
jne 0x406fe1
cmp edi, 1
je 0x40713f
cmp edi, ebx
je 0x40712b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4070c0
push dword [ebp + 8]
mov eax, esi
call fcn.00406423
test eax, eax
jne 0x4070b2
jmp 0x407142
xor ebx, ebx
inc ebx
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.00402528
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.00402528
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
call fcn.00402528
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.00402528
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
mov eax, ebx
pop ebx
call fcn.004120cb
leave
ret 8