Function at 0x405160
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x18dc
call fcn.00415e50
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x18d8], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 8]
push edi
mov dword [esp + 0x14], ecx
push 0x7f
lea eax, [esp + 0x65]
mov byte [esp + 0x64], 0
push 0
push eax
call fcn.00415320
add esp, 0xc
lea eax, [esp + 0x60]
push str.api.7958.com
push 0x80
push eax
call fcn.00411c67
add esp, 0xc
push str.api.7958.com
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
je 0x40543c
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [esp + 0x2e], 0
xorps xmm0, xmm0
mov dword [esp + 0x1c], esi
mov eax, 2
movq qword [esp + 0x26], xmm0
push 0x50
mov word [esp + 0x36], 0
mov word [esp + 0x28], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov eax, dword [edi + 0xc]
push 0x10
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x40542f
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0x10]
push 4
push eax
push 0x1005
push 0xffff
push esi
mov dword [esp + 0x24], 0xbb8
call edi
push 4
lea eax, [esp + 0x14]
push eax
push 0x1006
push 0xffff
push esi
call edi
mov eax, dword [str.XNtuRN]
xorps xmm0, xmm0
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov ax, word [0x4333d4]
mov word [esp + 0x38], ax
mov al, byte [0x4333d6]
mov byte [esp + 0x3a], al
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x40]
mov byte [esp + 0x40], 0
push eax
push edi
movdqu xmmword [esp + 0x49], xmm0
movdqu xmmword [esp + 0x59], xmm0
call fcn.004056a0
lea ecx, [edi - 1]
lea ebx, [ebx]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4052c0
mov eax, dword [str.sig]
lea edx, [esp + 0x3c]
mov dword [ecx], eax
mov esi, edx
mov ax, word [0x4333dc]
mov word [ecx + 4], ax
mov al, byte [edx]
inc edx
test al, al
jne 0x4052e1
sub edx, esi
dec edi
jmp 0x4052f0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4052f0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x20]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
call fcn.004050b0
push 0x7ff
lea eax, [esp + 0xe5]
mov byte [esp + 0xe4], 0
push 0
push eax
call fcn.00415320
mov esi, dword [esp + 0x2c]
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
jmp 0x405340
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405340
push esi
sub ecx, edx
lea eax, [esp + 0x64]
push ecx
push eax
push str._api_setupanay
lea eax, [esp + 0xf0]
push str.POST__s_HTTP_1.1_r_nHost:__s__r_nContent_Length:__d__r_nConnection:close_r_nAccept_Language:_zh_cn_r_nCache_Conbtrol:no_cache_r_nContent_Type:application_x_www_form_urlencoded_r_n_r_n_s_r_n_r_n
push eax
call fcn.004058b0
push esi
call fcn.00411712
lea ecx, [esp + 0xfc]
add esp, 0x1c
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405380
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0xe0]
push 0
sub ecx, edx
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x40542f
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ecx]
cmp ebx, 5
jg 0x40544d
push 0xfff
lea eax, [esp + 0x8e5]
mov byte [esp + 0x8e4], 0
push 0
push eax
call fcn.00415320
add esp, 0xc
lea eax, [esp + 0x8e0]
push 0
push 0x1000
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
push esi
test eax, eax
jg 0x405467
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x12c
inc ebx
call edi
lea eax, [esp + 0xe0]
lea edx, [eax + 1]
jmp 0x405410
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405410
push 0
sub eax, edx
push eax
lea eax, [esp + 0xe8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x4053b0
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x12c
inc ebx
call esi
cmp ebx, 0xa
jle 0x405194
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18d8]
xor ecx, esp
call fcn.00411717
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [esp + 0x8e0]
push eax
call fcn.004054a0
test eax, eax
jne 0x405436
mov ecx, dword [esp + 0x18e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00411717
mov esp, ebp
pop ebp
ret 4