Function at 0x10004df0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
mov eax, dword [0x10009ba8]
sub esp, 0x734
test eax, eax
je 0x10004e04
mov eax, dword [eax + 4]
jmp 0x10004e0b
mov eax, dword [esp + 0x738]
push ebx
push ebp
mov dword [0x10009ba8], eax
push esi
mov esi, dword [eax + 4]
xor ecx, ecx
cmp esi, eax
push edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
je 0x100053b6
jmp 0x10004e33
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp dword [esi + 8], 6
je 0x100053a2
test ecx, ecx
je 0x10004e47
push ecx
call sub.WS2_32.dll_closesocket
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov cx, word [esi + 0x10]
mov ebx, eax
mov eax, dword [esi + 0xc]
push ecx
mov dword [esp + 0x18], ebx
mov word [esp + 0x24], 2
mov dword [esp + 0x28], eax
call sub.WS2_32.dll_htons
lea edx, [esp + 0x20]
push 0x10
push edx
push ebx
mov word [esp + 0x2e], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x10004e92
push ebx
call sub.WS2_32.dll_closesocket
jmp 0x100053a2
mov eax, dword [esp + 0x754]
test eax, eax
je 0x10004e9f
mov dword [eax], esi
mov edx, dword [esi + 8]
cmp edx, 5
ja case.0x10004eab.2
jmp dword [edx*4 + 0x100053e4]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x244]
test edx, edx
rep stosd dword es:[edi], eax
jne 0x10004ef8
mov eax, dword [esp + 0x750]
mov ecx, dword [esp + 0x74c]
and eax, 0xffff
push str.Connection:_keep_alive
push eax
push ecx
lea edx, [esp + 0x250]
push str.CONNECT__ls:_d_HTTP_1.1_r_n_s_r_n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
jmp 0x10004f36
mov eax, dword [0x100097a0]
push str.Connection:_keep_alive
mov ecx, eax
inc eax
mov dword [0x100097a0], eax
mov eax, dword [esp + 0x754]
push ecx
mov ecx, dword [esp + 0x754]
and eax, 0xffff
lea edx, [esp + 0x24c]
push eax
push ecx
push str.POST_http:___ls:_d__x_HTTP_1.1_r_n_s_r_nContent_Length:_2_r_n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
mov al, byte [esi + 0x12]
test al, al
je 0x10004fd4
or ecx, 0xffffffff
mov edi, str.Proxy_Authorization:_Basic
xor eax, eax
lea edx, [esp + 0x244]
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
mov eax, dword [esp + 0x10]
and ecx, 3
lea edx, [esp + 0x244]
rep movsb byte es:[edi], byte [esi]
lea edi, [eax + 0x13]
or ecx, 0xffffffff
xor eax, eax
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 + 0x244]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10009168
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10009168
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x244]
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 eax, dword [esp + 0x10]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [eax + 8], 1
jne 0x10005040
mov edi, 0x10009164
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x244]
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x244]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
mov esi, ecx
lea eax, [esp + 0x248]
push esi
push eax
push ebx
call sub.WS2_32.dll_send
cmp eax, esi
jne 0x1000539e
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x244]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x248]
push 0x400
push ecx
push ebx
call sub.WS2_32.dll_recv
cmp eax, 0xa
jle 0x10005392
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea edx, [esp + 0x244]
push str.200_OK
push edx
call esi
add esp, 8
test eax, eax
jne 0x100053d5
lea eax, [esp + 0x244]
push str.200_Connection_established
push eax
call esi
add esp, 8
test eax, eax
jne 0x100053d5
mov esi, dword [esp + 0x10]
push ebx
call sub.WS2_32.dll_closesocket
jmp 0x100053a2
mov al, byte [esi + 0x12]
mov ebp, 9
test al, al
je 0x100050ff
lea edi, [esi + 0x13]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
add ebp, 9
mov edx, dword [esp + 0x74c]
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.10006960
add esp, 8
test eax, eax
je 0x100053c7
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
mov eax, dword [esp + 0x754]
xor ecx, ecx
add esp, 4
mov cl, ah
mov byte [esi], 4
mov byte [esi + 1], 1
mov byte [esi + 2], cl
mov byte [esi + 3], al
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov dword [esi + 4], edx
mov cl, byte [eax + 0x12]
test cl, cl
je 0x1000518c
lea ebx, [eax + 0x13]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10005188
mov edi, ebx
or ecx, 0xffffffff
xor edx, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10005188
mov al, byte [ebx + edx]
mov edi, ebx
mov byte [esi + edx + 8], al
or ecx, 0xffffffff
xor eax, eax
inc edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jb 0x10005170
mov ebx, dword [esp + 0x14]
push 0
push ebp
push esi
push ebx
mov byte [esi + ebp - 1], 0
call sub.WS2_32.dll_send
cmp eax, ebp
jne 0x1000539e
push 0
push 4
push esi
push ebx
mov dword [esi], 0
call sub.WS2_32.dll_recv
cmp eax, 4
jl 0x10005392
cmp byte [esi + 1], 0x5a
je 0x100053d5
mov esi, dword [esp + 0x10]
push ebx
call sub.WS2_32.dll_closesocket
jmp 0x100053a2
mov dl, byte [esi + 0x12]
mov byte [esp + 0x30], 5
test dl, dl
je 0x10005201
lea edi, [esi + 0x13]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10005201
mov byte [esp + 0x31], 2
mov byte [esp + 0x32], al
mov byte [esp + 0x33], 2
jmp 0x1000520b
mov byte [esp + 0x31], 1
mov byte [esp + 0x32], 0
and edx, 0xff
push 0
add edx, 3
lea ecx, [esp + 0x34]
push edx
push ecx
push ebx
call sub.WS2_32.dll_send
push 0
lea edx, [esp + 0x34]
push 2
push edx
push ebx
call sub.WS2_32.dll_recv
mov al, byte [esp + 0x31]
test al, al
je 0x100052f2
cmp al, 2
jne 0x100052f2
mov al, byte [esi + 0x12]
test al, al
je 0x100052f2
lea ebp, [esi + 0x13]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add esi, 0x112
mov edx, ecx
mov edi, esi
or ecx, 0xffffffff
mov byte [esp + 0x30], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x31], dl
test edx, edx
mov dword [esp + 0x18], ecx
jle 0x10005295
cmp eax, 0xff
jge 0x10005295
mov cl, byte [eax + ebp]
mov byte [esp + eax + 0x32], cl
inc eax
cmp eax, edx
jl 0x10005282
mov ecx, dword [esp + 0x18]
add eax, 2
xor edx, edx
mov byte [esp + eax + 0x30], cl
inc eax
test ecx, ecx
jle 0x100052c2
lea edi, [esp + eax + 0x30]
cmp edx, 0xff
jge 0x100052c2
mov cl, byte [esi + edx]
inc edx
mov byte [edi], cl
mov ecx, dword [esp + 0x18]
inc edi
cmp edx, ecx
jl 0x100052ab
add eax, edx
push 0
lea edx, [esp + 0x34]
push eax
push edx
push ebx
mov byte [esp + eax + 0x40], 0
call sub.WS2_32.dll_send
push 0
lea eax, [esp + 0x34]
push 2
push eax
push ebx
call sub.WS2_32.dll_recv
mov al, byte [esp + 0x31]
test al, al
jne 0x1000539e
mov ecx, dword [esp + 0x74c]
lea edx, [esp + 0x644]
push ecx
push 0x100092ac
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x650]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x644]
mov eax, ecx
mov edx, ecx
lea edi, [esp + 0x35]
mov byte [esp + 0x30], 5
shr ecx, 2
mov byte [esp + 0x31], 1
mov byte [esp + 0x32], 0
mov byte [esp + 0x33], 3
mov byte [esp + 0x34], al
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
add eax, 7
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x750]
push 0
mov dl, ch
push eax
mov byte [esp + eax + 0x36], dl
mov byte [esp + eax + 0x37], cl
lea eax, [esp + 0x38]
push eax
push ebx
call sub.WS2_32.dll_send
push 0
lea ecx, [esp + 0x34]
push 0x212
push ecx
push ebx
call sub.WS2_32.dll_recv
mov al, byte [esp + 0x31]
test al, al
je 0x100053d5
mov esi, dword [esp + 0x10]
push ebx
call sub.WS2_32.dll_closesocket
jmp 0x100053a2
mov esi, dword [esp + 0x10]
mov esi, dword [esi + 4]
mov eax, dword [0x10009ba8]
cmp esi, eax
mov dword [esp + 0x10], esi
jne 0x10004e2b
mov eax, dword [esp + 0x754]
test eax, eax
je 0x100053c7
mov dword [eax], 0
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x734
ret
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x734
ret