Function at 0x1002a320
Capabilities:
Download and write a file
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:
mov eax, 0x10038
call fcn.1003a3a0
push ebx
push ebp
mov ebp, dword [esp + 0x1004c]
push esi
mov esi, dword [esp + 0x10048]
push edi
mov ecx, 0xa
xor eax, eax
mov edx, dword [esi + 4]
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x40]
lea eax, [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
jne 0x1002a38a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._WSAEnumNetworkEvents_Fail_on_controlsocket_err_i
call fcn.10001000
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
test byte [esp + 0x1c], 0x10
je 0x1002a495
push str._Control:FD_CONNECT
call fcn.10001000
mov ebx, dword [esp + 0x10054]
add esp, 4
mov eax, dword [ebx + 8]
dec eax
je 0x1002a404
sub eax, 3
jne 0x1002a3f8
lea eax, [esi + 0x1c]
sub esp, 0x10
mov ecx, esp
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 4]
push ecx
call fcn.1002aea0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1002a3f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
mov eax, dword [esi + 0x2c]
or al, 1
mov dword [esi + 0x2c], eax
mov dword [ebp], 1
jmp 0x1002a49c
mov ecx, 0x3fff
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor ecx, ecx
lea edx, [ebx + 0x112]
mov cx, word [ebx + 4]
push edx
stosb byte es:[edi], al
lea eax, [ebx + 0x41e]
push ecx
lea edx, [ebx + 0x626]
push eax
lea ecx, [ebx + 0x522]
push edx
push ecx
push eax
lea edx, [esp + 0x60]
push str.GET_ftp:___s_s__s_HTTP_1.0_r_nHost:__s:_d_r_nUser_Agent:__s_r_nProxy_Connection:_Keep_Alive_r_n_r_n
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x68]
push eax
push str._____s
call fcn.10001000
lea edi, [esp + 0x70]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x28
repne scasb al, byte es:[edi]
mov edx, dword [esi + 4]
push 0
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x50]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1002a3f8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
mov ebx, dword [esp + 0x10050]
test byte [esp + 0x1c], 1
je 0x1002a759
mov ecx, 0x3fff
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x10], 0
mov word [esp + 0x11], ax
mov byte [esp + 0x13], al
mov eax, dword [ebx + 8]
cmp eax, 4
jne 0x1002a501
mov eax, dword [esi + 0x2c]
test al, 1
je 0x1002a501
mov ecx, dword [esi + 4]
and al, 0xfe
push ecx
mov dword [esi + 0x2c], eax
call fcn.1002af20
add esp, 4
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov eax, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
mov ecx, dword [esi + 4]
push 0
lea eax, [esp + 0x4c]
push 0x10000
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1002a74c
cmp eax, 0xffffffff
je 0x1002a74c
mov ecx, dword [ebp + 0x20]
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x50]
push eax
push ecx
call fcn.1002af90
add esp, 0x10
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1002a552
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
cmp dword [ebx + 8], 1
je 0x1002a56f
mov eax, dword [ebp + 0x20]
mov dl, byte [eax]
mov byte [esp + 0x10], dl
mov cl, byte [eax + 1]
mov byte [esp + 0x11], cl
mov dl, byte [eax + 2]
mov byte [esp + 0x12], dl
mov esi, dword [ebp + 0x20]
cmp byte [esi], 0
je 0x1002a660
mov ebx, dword [sym.imp.MSVCRT.dll_strchr]
push 0xd
push esi
call ebx
add esp, 8
test eax, eax
je 0x1002a659
mov eax, dword [esp + 0x10050]
push 0xa
push esi
cmp dword [eax + 8], 1
jne 0x1002a5b4
call ebx
push esi
mov byte [eax], 0
call fcn.10001000
add esp, 0xc
jmp 0x1002a645
call ebx
add esp, 8
test eax, eax
jne 0x1002a5cc
push str._CR_NULL_has_come_
call fcn.10001000
add esp, 4
jmp 0x1002a645
push 0xa
push esi
call ebx
push esi
mov byte [eax], 0
call fcn.10001000
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 4
jb 0x1002a645
mov cl, byte [esi]
mov al, byte [esp + 0x10]
cmp cl, al
jne 0x1002a645
mov dl, byte [esi + 1]
mov al, byte [esp + 0x11]
cmp dl, al
jne 0x1002a645
mov al, byte [esi + 2]
mov cl, byte [esp + 0x12]
cmp al, cl
jne 0x1002a645
cmp byte [esi + 3], 0x20
jne 0x1002a645
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [esp + 0x10050]
lea edx, [esi + 4]
push edx
push eax
mov eax, dword [esp + 0x1005c]
push ebp
push eax
push ecx
call fcn.10029d60
add esp, 0x18
test eax, eax
je 0x1002a74c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x1002a581
mov ebx, dword [esp + 0x10050]
cmp dword [ebx + 8], 1
jne 0x1002a672
cmp byte [esi], 0xd
jne 0x1002a672
mov esi, 1
jmp 0x1002a674
xor esi, esi
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x20]
push edx
push eax
push ecx
call fcn.1002b060
add esp, 0xc
test esi, esi
je 0x1002a759
mov edx, dword [ebx + 8]
mov ecx, dword [esp + 0x10058]
mov eax, dword [ebp + 0x10]
push edx
add ecx, 0x52c
push eax
push ecx
call fcn.1002a200
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x1002a6c5
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
push str._HTTPPROXY:_Transfer_on_going...
call fcn.10001000
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x20]
add esp, 4
lea edx, [esp + 0x14]
mov dword [ebp], 2
push 0
push edx
mov edx, dword [ebp + 0xc]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [eax]
add edx, ecx
mov dword [eax], edx
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
je 0x1002a717
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
mov edx, dword [ebp + 0x18]
add edx, eax
lea eax, [ebp + 0x24]
mov dword [ebp + 0x18], edx
mov ecx, dword [ebp + 0x1c]
lea edx, [ebp + 0x2c]
adc ecx, 0
push edx
mov edx, dword [esp + 0x10050]
mov dword [ebp + 0x1c], ecx
mov ecx, dword [ebp + 0x40]
push eax
mov eax, dword [edx + 4]
push ecx
push eax
call fcn.1002a290
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1002a759
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10038
ret
test byte [esp + 0x1c], 0x20
je 0x1002a77c
push str._Control:FD_CLOSE
call fcn.10001000
mov eax, dword [ebp]
add esp, 4
cmp eax, 2
je 0x1002a77c
mov dword [ebp], 3
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10038
ret