Function at 0x415870
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47679b
mov eax, dword fs:[0]
push eax
mov eax, 0x30e8
call fcn.00444200
mov eax, dword [0x4a6c44]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x30ec], eax
lea eax, [ebp - 0x3050]
push eax
lea eax, [ebp - 0x30e8]
mov dword [ecx], 0
push eax
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x30f0], ecx
push eax
push edi
mov dword [ebp - 0x30dc], edx
mov dword [edx], 0
call fcn.00411fb0
add esp, 0x10
test al, al
jne 0x415919
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
push edi
push str.Failed_to_parse_SERVER_ADDRESS:__s__Error_Code___d__Error___s
push 0x460
push 0x47eb50
push 3
push str.Utility::URLDownload
jmp 0x416265
lea eax, [ebp - 0x2050]
push eax
lea eax, [ebp - 0x1050]
push eax
call fcn.00412930
add esp, 8
test al, al
jne 0x41595f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
push edi
push str.Failed_to_get_IP_address_for_SERVER_ADDRESS:__s__Error_Code___d__Error___s
push 0x467
push 0x47eb50
push 3
push str.Utility::URLDownload
jmp 0x416265
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x30a8], xmm0
mov word [ebp - 0x30a8], ax
lea eax, [ebp - 0x2050]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x416238
mov dword [ebp - 0x30a4], eax
lea eax, [ebp - 0x2050]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x4159d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
lea eax, [ebp - 0x1050]
push eax
push str.gethostbyname__s__failed__error_code:__d__error:__s
push 0x477
push 0x47eb50
push 3
push str.Utility::URLDownload
jmp 0x416265
mov eax, dword [eax + 0xc]
mov esi, dword [ebp - 0x30e8]
cmp esi, 0x1bb
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x30a4], eax
mov eax, 0x50
cmove esi, eax
push esi
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 1
push 2
mov word [ebp - 0x30a6], ax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [ebp - 0x30e4], edi
cmp edi, 0xffffffff
jne 0x415a55
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
push str.socket___failed__error_code:__d__error:__s
push 0x48c
push 0x47eb50
push 3
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
add esp, 0x24
jmp 0x416273
push 4
lea eax, [ebp - 0x30f4]
mov dword [ebp - 0x30f4], 0x10001
push eax
push 0x80
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea eax, [ebp - 0x30a8]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x415ad3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
lea eax, [ebp - 0x1050]
push eax
push str.connect___failed__host:__s__error_code:__d__error:__s
push 0x499
push 0x47eb50
push 3
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push edi
call fcn.00411930
add esp, 0x2c
jmp 0x416273
push 0
push 0x47b918
lea ecx, [ebp - 0x3068]
mov dword [ebp - 0x3058], 0
mov dword [ebp - 0x3054], 0xf
mov byte [ebp - 0x3068], 0
call fcn.00401d51
push esi
lea eax, [ebp - 0x50]
mov dword [ebp - 4], 0
push 0x47ea0c
push eax
call fcn.00407cd0
add esp, 0xc
lea eax, [ebp - 0x3068]
cmp byte [ebp - 0x3050], 0
push eax
push str.GET
jne 0x415b93
lea eax, [ebp - 0x3098]
push eax
call fcn.0040f600
push 0x47eb38
push eax
lea eax, [ebp - 0x30c0]
mov byte [ebp - 4], 1
push eax
call fcn.00407e60
push str._HTTP_1.0_r_n
push eax
lea eax, [ebp - 0x3080]
mov byte [ebp - 4], 2
push eax
call fcn.00407e60
add esp, 0x24
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3080]
call fcn.004014f2
lea ecx, [ebp - 0x30c0]
call fcn.004014f2
lea ecx, [ebp - 0x3098]
jmp 0x415bf8
lea eax, [ebp - 0x3080]
push eax
call fcn.0040f600
lea ecx, [ebp - 0x3050]
mov byte [ebp - 4], 3
push ecx
push eax
lea eax, [ebp - 0x30c0]
push eax
call fcn.00407e60
push str._HTTP_1.0_r_n
push eax
lea eax, [ebp - 0x3098]
mov byte [ebp - 4], 4
push eax
call fcn.00407e60
add esp, 0x24
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3098]
call fcn.004014f2
lea ecx, [ebp - 0x30c0]
call fcn.004014f2
lea ecx, [ebp - 0x3080]
mov byte [ebp - 4], 0
call fcn.004014f2
push str.Accept:_image_gif__image_x_xbitmap__image_jpeg__image_pjpeg__application_vnd.ms_powerpoint__application_vnd.ms_excel__application_msword__application_x_shockwave_flash____r_n
lea eax, [ebp - 0x3068]
push eax
lea eax, [ebp - 0x3098]
push eax
call fcn.00407ec0
add esp, 0xc
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3098]
call fcn.004014f2
push str.Accept_Language:_en_us_r_n
lea eax, [ebp - 0x3068]
push eax
lea eax, [ebp - 0x3098]
push eax
call fcn.00407ec0
add esp, 0xc
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3098]
call fcn.004014f2
push str.Pragma:_no_cache_r_n
lea eax, [ebp - 0x3068]
push eax
lea eax, [ebp - 0x3098]
push eax
call fcn.00407ec0
add esp, 0xc
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3098]
call fcn.004014f2
push str.User_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0__.NET_CLR_1.0.3705__.NET_CLR_1.1.4322__r_n
lea eax, [ebp - 0x3068]
push eax
lea eax, [ebp - 0x3098]
push eax
call fcn.00407ec0
add esp, 0xc
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3098]
call fcn.004014f2
push str.Host:
lea eax, [ebp - 0x3068]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00407ec0
lea ecx, [ebp - 0x1050]
mov byte [ebp - 4], 5
push ecx
push eax
lea eax, [ebp - 0x30d8]
push eax
call fcn.00407e60
push 0x47cec0
push eax
lea eax, [ebp - 0x3080]
mov byte [ebp - 4], 6
push eax
call fcn.00407e60
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 7
push ecx
push eax
lea eax, [ebp - 0x30c0]
push eax
call fcn.00407e60
mov byte [ebp - 4], 8
push 0x47ef70
push eax
lea eax, [ebp - 0x3098]
push eax
call fcn.00407e60
add esp, 0x3c
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x3098]
call fcn.004014f2
lea ecx, [ebp - 0x30c0]
call fcn.004014f2
lea ecx, [ebp - 0x3080]
call fcn.004014f2
lea ecx, [ebp - 0x30d8]
call fcn.004014f2
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.004014f2
push str.Connection:_Keep_Alive_r_n_r_n
lea eax, [ebp - 0x3068]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00407ec0
add esp, 0xc
lea ecx, [ebp - 0x3068]
push eax
call fcn.00408230
lea ecx, [ebp - 0x28]
call fcn.004014f2
cmp dword [ebp - 0x3054], 0x10
lea eax, [ebp - 0x3068]
push 0
push dword [ebp - 0x3058]
cmovae eax, dword [ebp - 0x3068]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, dword [ebp - 0x3058]
je 0x415e27
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
lea eax, [ebp - 0x1050]
push eax
push str.send___failed__host:__s__error_code:__d__error:__s
push 0x4bf
push 0x47eb50
push 3
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push edi
call fcn.00411930
add esp, 0x2c
lea ecx, [ebp - 0x3068]
call fcn.004014f2
jmp 0x416273
push 0x10000
call fcn.0041d95f
add esp, 4
mov dword [ebp - 0x30e0], eax
push 0
push 0xffff
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
mov dword [ebp - 0x30e8], esi
test esi, esi
jg 0x415eae
mov eax, dword [ebp - 0x30e0]
push eax
call fcn.0041d95a
add esp, 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
push str.recv___iReturn___1__error_code:__d__error:__s
push 0x4ca
push 0x47eb50
push 0
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push edi
call fcn.00411930
add esp, 0x28
lea ecx, [ebp - 0x3068]
call fcn.004014f2
jmp 0x416273
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x415f6d
push 0xf
push str.Content_Length:
lea ecx, [ebp - 0x3080]
mov dword [ebp - 0x3070], edi
mov dword [ebp - 0x306c], 0xf
mov byte [ebp - 0x3080], 0
call fcn.00401d51
mov edi, dword [ebp - 0x30e0]
lea eax, [ebp - 0x3080]
cmp dword [ebp - 0x306c], 0x10
push esi
cmovae eax, dword [ebp - 0x3080]
push edi
push dword [ebp - 0x3070]
mov byte [ebp - 4], 9
push eax
call fcn.00411ef0
add esp, 0x10
cmp eax, 0xffffffff
je 0x41608f
add eax, dword [ebp - 0x3070]
xor ecx, ecx
cmp eax, esi
jge 0x415f4b
cmp ecx, 0x20
jge 0x415f45
mov dl, byte [eax + edi]
cmp dl, 0xd
je 0x415f42
cmp dl, 0xa
je 0x415f42
mov byte [ebp + ecx - 0x30], dl
inc eax
inc ecx
cmp eax, esi
jl 0x415f26
cmp ecx, 0x20
jae 0x416290
lea eax, [ebp - 0x30]
mov byte [ebp + ecx - 0x30], 0
push eax
call fcn.0044f73e
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x3080]
mov edi, eax
call fcn.004014f2
mov eax, dword [ebp - 0x30dc]
mov dword [eax], edi
test edi, edi
jle 0x4161ef
push esi
mov esi, dword [ebp - 0x30e0]
push esi
push 4
push 0x47f024
call fcn.00411ef0
add esp, 0x10
cmp eax, 0xffffffff
je 0x4161aa
lea esi, [eax + 4]
lea eax, [edi + 1]
push eax
call fcn.0041d95f
mov edx, dword [ebp - 0x30f0]
mov ecx, dword [ebp - 0x30ec]
mov dword [edx], eax
mov eax, dword [ebp - 0x30e8]
sub eax, esi
push eax
mov dword [ecx], eax
mov eax, dword [ebp - 0x30e0]
add eax, esi
push eax
push dword [edx]
call fcn.00446600
push dword [ebp - 0x30e0]
call fcn.0041d95a
mov eax, dword [ebp - 0x30ec]
add esp, 0x14
mov ecx, 0x10000
sub edi, dword [eax]
mov eax, 0x3800
cmp byte [ebp + 0x10], 0
cmove eax, ecx
mov dword [ebp - 0x30e8], eax
test edi, edi
je 0x41606f
lea esi, [eax - 1]
push eax
call fcn.0041d95f
add esp, 4
mov dword [ebp - 0x30dc], eax
push 0
push esi
push eax
push dword [ebp - 0x30e4]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jle 0x416150
mov eax, dword [ebp - 0x30ec]
push esi
push dword [ebp - 0x30dc]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x30f0]
add ecx, dword [eax]
push ecx
call fcn.00446600
mov eax, dword [ebp - 0x30ec]
push dword [ebp - 0x30dc]
add dword [eax], esi
call fcn.0041d95a
mov eax, dword [ebp - 0x30e8]
add esp, 0x10
sub edi, esi
lea esi, [eax - 1]
jne 0x416006
push dword [ebp - 0x30e4]
call fcn.00411930
add esp, 4
lea ecx, [ebp - 0x3068]
call fcn.004014f2
mov al, 1
jmp 0x416275
push str.missing_Content_Length
push 0x4e8
push 0x47eb50
push 0
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push esi
push edi
push 4
push 0x47f024
call fcn.00411ef0
add esp, 0x28
cmp eax, 0xffffffff
je 0x41610d
mov ecx, dword [ebp - 0x30dc]
lea esi, [eax + 4]
mov eax, dword [ebp - 0x30e8]
sub eax, esi
mov dword [ecx], eax
inc eax
push eax
call fcn.0041d95f
mov ecx, dword [ebp - 0x30f0]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x30dc]
push dword [ecx]
lea ecx, [esi + edi]
push ecx
push eax
call fcn.00446600
push edi
call fcn.0041d95a
mov eax, dword [ebp - 0x30dc]
add esp, 0x14
mov esi, dword [eax]
jmp 0x41611d
mov ecx, dword [ebp - 0x30f0]
mov eax, dword [ebp - 0x30dc]
mov dword [ecx], edi
mov dword [eax], esi
mov ecx, dword [ebp - 0x30ec]
push dword [ebp - 0x30e4]
mov dword [ecx], esi
call fcn.00411930
add esp, 4
lea ecx, [ebp - 0x3080]
call fcn.004014f2
lea ecx, [ebp - 0x3068]
call fcn.004014f2
mov al, 1
jmp 0x416275
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
push str.recv___iReturn___1__error_code:__d__error:__s
push 0x51c
push 0x47eb50
push 0
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push dword [ebp - 0x30e4]
call fcn.00411930
push dword [ebp - 0x30dc]
call fcn.0041d95a
add esp, 0x2c
lea ecx, [ebp - 0x3068]
call fcn.004014f2
jmp 0x416273
push esi
call fcn.0041d95a
push str.invalid_header
push 0x52d
push 0x47eb50
push 0
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push dword [ebp - 0x30e4]
call fcn.00411930
add esp, 0x20
lea ecx, [ebp - 0x3068]
call fcn.004014f2
jmp 0x416273
push dword [ebp - 0x30e0]
call fcn.0041d95a
push str.no_new_download
push 0x535
push 0x47eb50
push 0
push str.Utility::URLDownload
push dword [0x4a9068]
call fcn.0040ee70
push dword [ebp - 0x30e4]
call fcn.00411930
add esp, 0x20
lea ecx, [ebp - 0x3068]
call fcn.004014f2
mov al, 1
jmp 0x416275
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
push eax
push esi
lea eax, [ebp - 0x1050]
push eax
push str.inet_addr__s__failed__error_code:__d__error:__s
push 0x480
push 0x47eb50
push 3
push str.Download
push dword [0x4a9068]
call fcn.0040ee70
add esp, 0x28
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004440d2
mov esp, ebp
pop ebp
ret
call fcn.00443ff8
int3