Function at 0x40d110
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x448a9b
mov eax, dword fs:[0]
push eax
sub esp, 0x90c
mov eax, dword [0x45b6e4]
xor eax, esp
mov dword [esp + 0x908], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45b6e4]
xor eax, esp
push eax
lea eax, [esp + 0x920]
mov dword fs:[0], eax
mov esi, dword [esp + 0x934]
mov eax, dword [esp + 0x930]
push 0x200
lea edx, [esp + 0x320]
push 0
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x44], ecx
call fcn.00430890
add esp, 0xc
test esi, esi
je 0x40d191
push esi
push str.Content_Length:__ld_r_n
lea edx, [esp + 0x324]
call fcn.0040e090
add esp, 8
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x520]
push ecx
lea edx, [esp + 0x224]
push edx
lea eax, [esp + 0x214]
call fcn.0040cf50
mov edi, str.HTTP
lea esi, [esp + 0x208]
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40d1d3
mov eax, 2
jmp 0x40d9cf
lea ecx, [esp + 0x74]
push ecx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40d1f1
mov eax, 3
jmp 0x40d9cf
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x2c], esi
jne 0x40d212
mov eax, 4
jmp 0x40d9cf
mov edx, dword [esp + 0x18]
push edx
mov word [esp + 0x68], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x66], ax
lea eax, [esp + 0x21c]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40d242
mov ecx, dword [eax + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax]
push 0x10
lea edx, [esp + 0x68]
push edx
push esi
mov dword [esp + 0x74], eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x40d262
mov eax, 5
jmp 0x40d9cf
mov eax, str.POST
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d270
sub eax, edx
mov dword [esp + 0x30], eax
lea eax, [esp + 0x51c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d290
sub eax, edx
mov dword [esp + 0x28], eax
mov eax, str._HTTP_1.1_r_n
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d2a7
sub eax, edx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x31c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d2c0
sub eax, edx
mov ebp, eax
mov eax, str.Host:
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d2d5
sub eax, edx
mov ebx, eax
lea eax, [esp + 0x21c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d2f0
sub eax, edx
mov edi, eax
mov eax, str._r_nContent_Type:application_x_www_form_urlencoded_r_nConnection:_close_r_n
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d305
sub eax, edx
mov ecx, eax
mov eax, 0x4504d4
lea esi, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40d320
sub eax, esi
add eax, ecx
add eax, edi
add eax, ebx
add eax, ebp
add eax, dword [esp + 0x18]
mov ecx, str.POST
add eax, dword [esp + 0x28]
lea esi, [ecx + 1]
add eax, dword [esp + 0x30]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x40d347
sub ecx, esi
lea edx, [esp + 0x51c]
mov dword [esp + 0x24], ecx
lea esi, [edx + 1]
mov bl, byte [edx]
add edx, 1
test bl, bl
jne 0x40d360
sub edx, esi
mov dword [esp + 0x34], edx
mov edx, str._HTTP_1.1_r_n
lea esi, [edx + 1]
mov bl, byte [edx]
add edx, 1
test bl, bl
jne 0x40d377
sub edx, esi
mov dword [esp + 0x18], edx
lea edx, [esp + 0x31c]
lea esi, [edx + 1]
mov bl, byte [edx]
add edx, 1
test bl, bl
jne 0x40d390
sub edx, esi
mov dword [esp + 0x28], edx
mov edx, str.Host:
lea esi, [edx + 1]
mov bl, byte [edx]
add edx, 1
test bl, bl
jne 0x40d3a7
sub edx, esi
mov dword [esp + 0x30], edx
lea edx, [esp + 0x21c]
lea esi, [edx + 1]
mov bl, byte [edx]
add edx, 1
test bl, bl
jne 0x40d3c0
sub edx, esi
mov ecx, edx
mov edx, str._r_nContent_Type:application_x_www_form_urlencoded_r_nConnection:_close_r_n
lea esi, [edx + 1]
mov bl, byte [edx]
add edx, 1
test bl, bl
jne 0x40d3d5
sub edx, esi
mov esi, 0x4504d4
lea edi, [esi + 1]
mov bl, byte [esi]
add esi, 1
test bl, bl
jne 0x40d3e8
sub esi, edi
cmp dword [esp + 0x1c], 0
jne 0x40d3fe
xor edi, edi
jmp 0x40d410
mov edi, dword [esp + 0x1c]
lea ebp, [edi + 1]
mov bl, byte [edi]
add edi, 1
test bl, bl
jne 0x40d405
sub edi, ebp
add esi, edi
add esi, edx
add esi, ecx
add esi, dword [esp + 0x30]
lea edi, [eax + 1]
add esi, dword [esp + 0x28]
push edi
add esi, dword [esp + 0x1c]
add esi, dword [esp + 0x38]
add esi, dword [esp + 0x28]
call fcn.0042e51e
add esp, 4
add esi, 1
push esi
mov ebx, eax
call fcn.0042e51e
add esp, 4
push edi
push 0
push ebx
mov ebp, eax
call fcn.00430890
add esp, 0xc
push esi
push 0
push ebp
call fcn.00430890
add esp, 0xc
cmp byte [esp + 0x51c], 0
jne 0x40d482
push 0x400
lea eax, [esp + 0x520]
push 0x450568
push eax
call fcn.0042ebe0
add esp, 0xc
cmp dword [esp + 0x1c], 0
jne 0x40d4c6
mov eax, str.GET
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d491
sub eax, edx
push eax
push str.GET
push ebx
call fcn.0042ebe0
mov eax, str.GET
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d4b3
sub eax, edx
push eax
push str.GET
jmp 0x40d503
mov eax, str.POST
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d4d0
sub eax, edx
push eax
push str.POST
push ebx
call fcn.0042ebe0
mov eax, str.POST
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d4f2
sub eax, edx
push eax
push str.POST
push ebp
call fcn.0042ebe0
lea eax, [esp + 0x528]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d516
sub eax, edx
push eax
lea ecx, [esp + 0x520]
push ecx
push ebx
call fcn.0042ed20
lea eax, [esp + 0x528]
add esp, 0xc
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d540
sub eax, edx
push eax
lea edx, [esp + 0x520]
push edx
push ebp
call fcn.0042ed20
mov eax, str._HTTP_1.1_r_n
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d565
sub eax, edx
push eax
push str._HTTP_1.1_r_n
push ebx
call fcn.0042ed20
mov eax, str._HTTP_1.1_r_n
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d587
sub eax, edx
push eax
push str._HTTP_1.1_r_n
push ebp
call fcn.0042ed20
lea eax, [esp + 0x328]
add esp, 0xc
lea edx, [eax + 1]
jmp 0x40d5b0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d5b0
sub eax, edx
push eax
lea eax, [esp + 0x320]
push eax
push ebx
call fcn.0042ed20
lea eax, [esp + 0x328]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d5d7
sub eax, edx
push eax
lea ecx, [esp + 0x320]
push ecx
push ebp
call fcn.0042ed20
mov eax, str.Host:
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d600
sub eax, edx
push eax
push str.Host:
push ebx
call fcn.0042ed20
mov eax, str.Host:
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d622
sub eax, edx
push eax
push str.Host:
push ebp
call fcn.0042ed20
lea eax, [esp + 0x228]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d646
sub eax, edx
push eax
lea edx, [esp + 0x220]
push edx
push ebx
call fcn.0042ed20
lea eax, [esp + 0x228]
add esp, 0xc
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d670
sub eax, edx
push eax
lea eax, [esp + 0x220]
push eax
push ebp
call fcn.0042ed20
mov eax, str._r_nContent_Type:application_x_www_form_urlencoded_r_nConnection:_close_r_n
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d695
sub eax, edx
push eax
push str._r_nContent_Type:application_x_www_form_urlencoded_r_nConnection:_close_r_n
push ebx
call fcn.0042ed20
mov eax, str._r_nContent_Type:application_x_www_form_urlencoded_r_nConnection:_close_r_n
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d6b7
sub eax, edx
push eax
push str._r_nContent_Type:application_x_www_form_urlencoded_r_nConnection:_close_r_n
push ebp
call fcn.0042ed20
mov eax, 0x4504d4
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d6e0
sub eax, edx
push eax
push 0x4504d4
push ebx
call fcn.0042ed20
mov eax, 0x4504d4
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d702
sub eax, edx
push eax
push 0x4504d4
push ebp
call fcn.0042ed20
mov eax, ebx
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d721
mov ecx, dword [esp + 0x38]
sub eax, edx
push eax
push ebx
push ecx
call fcn.0042ebe0
mov eax, ebx
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d740
mov edi, dword [esp + 0x2c]
mov esi, dword [sym.imp.WS2_32.dll_send]
push 0
sub eax, edx
push eax
push ebx
push edi
call esi
push ebx
call fcn.0042e307
add esp, 4
cmp dword [esp + 0x1c], 0
je 0x40d79d
mov eax, dword [esp + 0x934]
test eax, eax
je 0x40d79d
mov ebx, dword [esp + 0x1c]
push 0
push eax
push ebx
push edi
call esi
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d787
sub eax, edx
push eax
push ebx
push ebp
call fcn.0042ed20
add esp, 0xc
lea esi, [esp + 0x3c]
call fcn.0040cec0
xor eax, eax
push 0x200
push eax
lea edx, [esp + 0x324]
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
call fcn.00430890
mov ebp, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
add esp, 0xc
mov ecx, dword [esp + 0x2c]
push 0
mov esi, 1
push esi
lea eax, [esp + 0x324]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40d7f5
mov dword [esp + 0x18], esi
mov al, byte [esp + 0x31c]
cmp al, 0xa
je 0x40d80a
cmp al, 0xd
je 0x40d81d
add dword [esp + 0x1c], esi
jmp 0x40d81d
cmp dword [esp + 0x1c], 0
jne 0x40d815
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 0
mov esi, edi
sub esi, ebx
cmp esi, ebp
mov byte [esp + 0x20], al
jb 0x40d83a
add ebp, ebp
push ebp
push ebx
call fcn.0042e5e1
mov ebx, eax
add esp, 8
lea edi, [esi + ebx]
mov dl, byte [esp + 0x20]
mov byte [edi], dl
add edi, 1
cmp dword [esp + 0x18], 0
je 0x40d7d2
mov eax, ebx
mov byte [edi], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40d852
mov ebp, dword [esp + 0x38]
sub eax, edx
push eax
lea esi, [ebp + 0x10000]
push ebx
push esi
call fcn.0042ebe0
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x40], esp
push str.Content_Length
call fcn.004010d0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x6c], esp
xor ebx, ebx
push esi
mov dword [esp + 0x964], ebx
call fcn.004010d0
lea ecx, [esp + 0x80]
mov dword [esp + 0x960], 0xffffffff
call fcn.0040cb40
mov edi, dword [esp + 0x84]
mov esi, 0x10
add esp, 0x38
cmp dword [esp + 0x60], esi
mov dword [esp + 0x18], ebx
jae 0x40d8ce
lea edi, [esp + 0x4c]
call fcn.0040d0a0
test eax, eax
je 0x40d8f2
cmp dword [esp + 0x60], esi
mov eax, dword [esp + 0x4c]
jae 0x40d8e5
lea eax, [esp + 0x4c]
push eax
call fcn.0042ed15
add esp, 4
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
lea esi, [esp + 0x3c]
mov dword [ebp + 0x12804], eax
call fcn.0040cec0
mov edi, dword [esp + 0x2c]
xor esi, esi
jmp 0x40d910
cmp esi, dword [esp + 0x18]
jge 0x40d96e
push 0x200
lea ecx, [esp + 0x320]
push 0
push ecx
call fcn.00430890
add esp, 0xc
push 0
push 0x1ff
lea edx, [esp + 0x324]
push edx
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40d96e
add esi, eax
lea ecx, [esp + 0x31c]
mov dword [esp + 0x24], esi
push ecx
mov ebx, eax
lea esi, [esp + 0x40]
mov byte [esp + eax + 0x320], 0
call fcn.0040cef0
mov esi, dword [esp + 0x24]
jmp 0x40d910
mov edx, dword [esp + 0x40]
mov byte [edx], 0
mov eax, dword [ebp + 0x12804]
add eax, 2
push eax
call fcn.0042e51e
mov ecx, dword [ebp + 0x12804]
add esp, 4
add ecx, 2
push ecx
push 0
push eax
mov dword [ebp + 0x12800], eax
call fcn.00430890
mov edx, dword [ebp + 0x12804]
mov eax, dword [esp + 0x48]
mov ecx, dword [ebp + 0x12800]
add esp, 0xc
push edx
push eax
push ecx
call fcn.00435e10
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x48]
call fcn.00401720
xor eax, eax
mov ecx, dword [esp + 0x920]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x908]
xor ecx, esp
call fcn.0042dec1
add esp, 0x918
ret 8