Function at 0x10004460
Capabilities:
Access peb ldr_data
Check os version
Connect socket
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports
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
push 0xffffffffffffffff
push 0x1009630d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x12a4
call fcn.10076300
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
push esi
mov dword [esp + 0x48], edi
call fcn.10076d4e
fld qword [0x1009cb48]
mov dword [esp + 0x34], eax
fstp qword [esp + 0x88]
add esp, 4
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x88]
mov dword [esp + 0x38], edx
mov dword [esp + 0x90], esi
call fcn.100037d0
call fcn.1008cdb1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x12bc], esi
call fcn.1008cdb1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x12bc], 1
call fcn.1008cdb1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x12bc], 2
call fcn.1008cdb1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x12c0], 3
call fcn.10003cf0
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx - 0xc]
add esp, 4
cmp eax, esi
jne 0x10004552
lea eax, [ebx - 0x10]
jmp 0x10004b8b
call fcn.1008cdb1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push eax
push ecx
lea edx, [esp + 0x1c]
push str.place_d_pretime_d
push edx
mov byte [esp + 0x12cc], 4
call fcn.10002d50
add esp, 0x10
call fcn.1008cdb1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
cmp dword [ebp + 8], 4
mov byte [esp + 0x12bc], 5
je 0x100045c6
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
push ecx
push eax
push ebx
lea eax, [esp + 0x2c]
push str.POST__pubwin_HTTP_1.1_r_nUser_Agent:_PubwinClient_r_nAccept:_text_html_level3_r_nHost:__s:8444_r_nContent_Length:__d_r_nCache_Control:_no_cache_r_n_r_n_s
push eax
call fcn.10002d50
add esp, 0x14
jmp 0x100045f5
mov ecx, dword [edi + 0x34]
push ecx
lea edx, [esp + 0x18]
push str.place100_ChildAdID_d
push edx
call fcn.10002d50
mov eax, dword [esp + 0x20]
mov ecx, dword [eax - 0xc]
push eax
push ecx
push ebx
lea eax, [esp + 0x38]
push str.POST__pubwin_HTTP_1.1_r_nUser_Agent:_PubwinClient_r_nAccept:_text_html_level3_r_nHost:__s:8444_r_nContent_Length:__d_r_nCache_Control:_no_cache_r_n_r_n_s
push eax
call fcn.10002d50
add esp, 0x20
push esi
push 1
mov edi, 2
push edi
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10004b38
push 0x10
lea eax, [esp + 0x78]
push eax
push ebx
mov word [esp + 0x80], di
mov word [esp + 0x82], si
mov dword [esp + 0x84], esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x10004a99
push 0x20fc
mov word [esp + 0x94], di
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x1c]
push ecx
mov word [esp + 0x96], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edx, [esp + 0x58]
push edx
push 0x8004667e
mov edi, 1
push ebx
mov dword [esp + 0xa0], eax
mov dword [esp + 0x64], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x10004a9e
mov eax, 3
jmp 0x10004698
mov eax, dword [esp + 0x30]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x30], eax
je 0x10004a9e
push 0x10
lea edx, [esp + 0x94]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1000470d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x10004694
lea eax, [esp + 0x3c]
push eax
push esi
lea ecx, [esp + 0xa8]
push ecx
push esi
push esi
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xb4], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jl 0x10004694
je 0x10004694
lea edx, [esp + 0xa0]
push edx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10004694
push 4
lea eax, [esp + 0x60]
push eax
push edi
push 6
push ebx
mov dword [esp + 0x70], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 0xc]
push esi
push eax
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x10004a9e
xor eax, eax
mov ecx, 0x400
lea edi, [esp + 0x2b0]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
rep stosd dword es:[edi], eax
mov dword [esp + 0x6c], 2
mov dword [esp + 0x70], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x6c]
push ecx
push 0
push 0
lea edx, [esp + 0x1b4]
push edx
push 0
mov dword [esp + 0x1c0], ebx
mov dword [esp + 0x1bc], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jl 0x10004a97
je 0x10004855
push 0
mov eax, 0x1000
sub eax, esi
push eax
lea ecx, [esp + esi + 0x2b8]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
mov dword [esp + 0x30], eax
je 0x10004a97
lea edx, [esp + 0x2b0]
add esi, eax
push str.Content_Length:
push edx
mov byte [esp + esi + 0x2b8], 0
call fcn.10076ec0
mov edi, eax
mov eax, dword [esp + 0x40]
add esp, 8
test eax, eax
jne 0x10004818
test edi, edi
je 0x1000484d
push 0x1009cc38
push edi
call fcn.10076ec0
add esp, 8
test eax, eax
je 0x1000484d
lea eax, [edi + 0x10]
push eax
call fcn.10076e12
add esp, 4
mov dword [esp + 0x38], eax
test eax, eax
jle 0x1000484d
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x1000484d
push str.AdID
push edi
call fcn.10076ec0
add esp, 8
test eax, eax
mov dword [esp + 0x3c], eax
je 0x1000484d
mov edx, eax
mov eax, dword [esp + 0x38]
mov ecx, esi
sub ecx, edx
lea edx, [esp + ecx + 0x2b0]
cmp edx, eax
je 0x1000486c
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x1000485f
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
test eax, eax
jl 0x1000486c
cmp dword [esp + 0x2c], 5
jl 0x10004768
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [esp + esi + 0x2b0], 0xd
lea eax, [esp + 0x2b0]
push eax
inc esi
mov byte [esp + esi + 0x2b4], 0xa
lea ecx, [esp + 0x14]
push 0x1009cc2c
inc esi
push ecx
mov byte [esp + esi + 0x2bc], 0
call fcn.10002d50
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebx - 0xc]
add esp, 0xc
test eax, eax
jge 0x100048b7
or eax, 0xffffffff
jmp 0x100048d0
push 0x1009cc38
push ebx
call fcn.10076a37
add esp, 8
test eax, eax
jne 0x100048ce
or eax, 0xffffffff
jmp 0x100048d0
sub eax, ebx
push eax
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x18]
call fcn.10003b90
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c0], 6
call fcn.100029e0
lea ecx, [esp + 0x30]
mov byte [esp + 0x12bc], 5
call fcn.10002010
mov edi, dword [esp + 0x18]
mov eax, dword [edi - 0xc]
test eax, eax
jl 0x10004926
push 0x1009cc28
push edi
call fcn.10076a37
add esp, 8
test eax, eax
je 0x10004926
sub eax, edi
cmp eax, 0xffffffff
jne 0x10004971
mov edi, dword [esp + 0x44]
xor eax, eax
mov ecx, 0x400
add edi, 0x50
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
call fcn.10002010
lea ecx, [esp + 0x14]
call fcn.10002010
lea ecx, [esp + 0x1c]
call fcn.10002010
lea ecx, [esp + 0x18]
call fcn.10002010
lea ecx, [esp + 0x28]
call fcn.10002010
lea ecx, [esp + 0x10]
call fcn.10002010
jmp 0x10004c1f
mov eax, dword [ebx - 0xc]
test eax, eax
jge 0x1000497d
or eax, 0xffffffff
jmp 0x10004996
push 0x1009cc20
push ebx
call fcn.10076a37
add esp, 8
test eax, eax
jne 0x10004994
or eax, 0xffffffff
jmp 0x10004996
sub eax, ebx
mov ebx, dword [esp + 0x44]
mov ecx, esi
sub ecx, eax
sub ecx, 3
lea esi, [esp + eax + 0x2b4]
mov eax, ecx
shr ecx, 2
lea edi, [ebx + 0x50]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
cmp eax, 9
rep movsb byte es:[edi], byte [esi]
je 0x10004a48
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, ebx
call fcn.100040b0
mov ecx, dword [ebx + 0x1050]
test ecx, ecx
mov byte [esp + 0x27], al
je 0x100049f7
test al, al
je 0x100049e7
lea eax, [ebx + 8]
jmp 0x100049e9
xor eax, eax
mov ecx, dword [ebx + 0x1050]
mov edx, dword [ecx]
push eax
push 0
call dword [edx + 8]
lea ecx, [esp + 0x20]
call fcn.10002010
lea ecx, [esp + 0x14]
call fcn.10002010
lea ecx, [esp + 0x1c]
call fcn.10002010
lea ecx, [esp + 0x18]
call fcn.10002010
lea ecx, [esp + 0x28]
call fcn.10002010
lea ecx, [esp + 0x10]
call fcn.10002010
mov al, byte [esp + 0x27]
mov ecx, dword [esp + 0x12b4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea ecx, [esp + 0x20]
call fcn.10002010
lea ecx, [esp + 0x14]
call fcn.10002010
lea ecx, [esp + 0x1c]
call fcn.10002010
lea ecx, [esp + 0x18]
call fcn.10002010
lea ecx, [esp + 0x28]
call fcn.10002010
lea ecx, [esp + 0x10]
call fcn.10002010
mov al, 1
mov ecx, dword [esp + 0x12b4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor esi, esi
mov edi, 1
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call fcn.10076d4e
fld qword [0x1009cb48]
mov dword [esp + 0x40], eax
fstp qword [esp + 0x64]
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x70], esi
mov dword [esp + 0x48], edx
call fcn.10076ae9
add esp, 8
cmp eax, esi
je 0x10004b34
mov cx, word [eax + 0x14]
add cx, 0x76c
mov word [esp + 0x48], cx
mov dx, word [eax + 0x10]
inc dx
mov word [esp + 0x4a], dx
mov cx, word [eax + 0x18]
mov word [esp + 0x4c], cx
mov dx, word [eax + 0xc]
mov word [esp + 0x4e], dx
mov cx, word [eax + 8]
mov word [esp + 0x50], cx
mov dx, word [eax + 4]
mov word [esp + 0x52], dx
mov ax, word [eax]
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x4c]
push edx
mov word [esp + 0x5c], ax
mov word [esp + 0x5e], si
call dword [sym.imp.OLEAUT32.dll_VariantTimeToSystemTime]
test eax, eax
mov dword [esp + 0x68], esi
jne 0x10004b38
mov dword [esp + 0x68], edi
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x12bc], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004b5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x12bc], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004b84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x12bc], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004baa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x12bc], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004bd0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x12bc], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004bf6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x12bc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004c1f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x12b4]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc