Function at 0x417010
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x22ec
call fcn.0045f650
mov eax, dword [0x4ff004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov esi, edx
mov dword [ebp - 0x22d4], ebx
cmp dword [ebx + 0x15c], 3
mov edi, 0x1000
mov dword [ebp - 0x22dc], esi
mov dword [ebp - 8], edi
je 0x41706c
push 0x438
push str.ytcp
push str.ASSERT_FAILED:_s:_d_n
push 0x438
push str.ytcp
call fcn.00409950
add esp, 0x14
mov ecx, dword [ebx]
mov edx, esi
mov ecx, dword [ecx + 4]
call fcn.00416020
mov dword [ebp - 0x22d0], eax
test eax, eax
jne 0x417098
mov eax, 0xfffffff8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
push dword [ebx + 0x24]
mov dword [ebx + 0x2c], 0xffffffff
push 0
push dword [ebx + 0x20]
mov dword [ebx + 0x28], 0
call fcn.00443620
mov esi, dword [ebx + 0x174]
add esp, 0xc
mov dword [ebx + 0x34], 0
cmp esi, 0xffffffff
je 0x41713a
lea eax, [ebp - 0x22e8]
mov dword [ebp - 0x1bc], esi
push eax
lea eax, [ebp - 0x21c0]
mov dword [ebp - 0x1c0], 1
push eax
lea eax, [ebp - 0x22c8]
mov dword [ebp - 0x22c4], esi
push eax
lea eax, [ebp - 0x1c0]
mov dword [ebp - 0x22c8], 1
push eax
lea eax, [esi + 1]
mov dword [ebp - 0x21bc], esi
xorps xmm0, xmm0
mov dword [ebp - 0x21c0], 1
push eax
movlpd qword [ebp - 0x22e8], xmm0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x4171a2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebp - 0x22dc]
mov eax, dword [ebx]
lea ecx, [ebx + 0x170]
push dword [ebp + 0xc]
mov edx, dword [ebp - 0x22d0]
push dword [ebp + 8]
mov dword [ebx + 0x174], 0xffffffff
movzx eax, word [eax + 0x18]
push eax
mov dword [ebp - 0x22e0], ecx
call fcn.004161d0
mov esi, eax
add esp, 0x10
test esi, esi
jns 0x417218
mov edi, dword [ebp - 0x22e0]
push dword [edi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x21c0]
push eax
push esi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x417133
lea eax, [ebp - 0x22c8]
push eax
push esi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x417133
lea eax, [ebp - 0x1c0]
push eax
push esi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x4171fa
push 0
push 0x80
lea eax, [ebp - 0xb8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x417133
mov eax, dword [ebx + 0x174]
lea ecx, [ebx + 0x170]
mov dword [ebp - 0x22e0], ecx
mov dword [ecx], eax
mov dword [ebx + 0x174], 0xffffffff
mov ebx, dword [ebx + 0xc]
lea esi, [ebp - 0x20b8]
mov dword [ebp - 0x22cc], esi
mov al, byte [ebx]
test al, al
je 0x417245
cmp al, 0x20
je 0x417245
mov byte [esi], al
inc ebx
inc esi
sub edi, 1
mov dword [ebp - 0x22cc], esi
mov dword [ebp - 8], edi
jne 0x417227
jmp 0x417257
test edi, edi
je 0x417257
mov byte [esi], 0x20
inc esi
dec edi
mov dword [ebp - 0x22cc], esi
mov dword [ebp - 8], edi
mov edx, dword [ebp - 0x22d4]
mov eax, dword [edx]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x22e4], eax
cmp byte [eax], 0
je 0x4172bb
mov ecx, eax
lea eax, [ecx + 1]
mov dword [ebp - 0x22d0], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417278
sub ecx, dword [ebp - 0x22d0]
mov dword [ebp - 0x22d0], ecx
lea eax, [ecx + 1]
cmp eax, edi
jge 0x4172bb
push ecx
push dword [ebp - 0x22e4]
push esi
call fcn.00444290
mov eax, dword [ebp - 0x22d0]
add esp, 0xc
mov edx, dword [ebp - 0x22d4]
sub edi, eax
add esi, eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x22cc], esi
inc ebx
test edi, edi
je 0x4172f4
mov al, byte [ebx]
test al, al
je 0x4172e2
cmp al, 0x20
je 0x4172e2
cmp al, 0xd
je 0x4172e2
mov byte [esi], al
inc ebx
inc esi
sub edi, 1
mov dword [ebp - 0x22cc], esi
mov dword [ebp - 8], edi
jne 0x4172c0
jmp 0x4172f4
test edi, edi
je 0x4172f4
mov byte [esi], 0x20
inc esi
dec edi
mov dword [ebp - 0x22cc], esi
mov dword [ebp - 8], edi
mov eax, dword [edx]
cmp dword [eax + 0x74], 0
je 0x41731f
cmp edi, 8
jl 0x41731f
mov eax, dword [0x467080]
sub edi, 8
mov dword [esi], eax
mov eax, dword [0x467084]
mov dword [esi + 4], eax
add esi, 8
mov dword [ebp - 8], edi
mov dword [ebp - 0x22cc], esi
mov al, byte [ebx]
test al, al
je 0x417338
mov cl, al
mov al, cl
cmp cl, 0xd
je 0x417338
mov al, byte [ebx + 1]
inc ebx
mov cl, al
test al, al
jne 0x417327
mov ecx, ebx
mov dword [ebp - 0x22d0], ecx
cmp al, 0xd
jne 0x417457
nop dword [eax + eax]
cmp byte [ebx + 1], 0xa
jne 0x417451
mov al, byte [ebx + 2]
add ebx, 2
cmp al, 0xd
je 0x417451
test al, al
je 0x41737c
nop dword [eax]
cmp al, 0xd
je 0x41737c
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x417370
push 0xe
push str._r_nContent_Type
push ecx
call fcn.00445e80
add esp, 0xc
test eax, eax
jne 0x417440
mov ecx, dword [ebp - 0x22d0]
mov eax, ebx
sub eax, ecx
cmp edi, eax
jbe 0x417440
lea esi, [ecx + 0xe]
cmp esi, ebx
jae 0x4173ba
nop dword [eax]
cmp byte [esi], 0x3a
je 0x4173ba
inc esi
cmp esi, ebx
jb 0x4173b0
inc esi
cmp esi, ebx
jae 0x4173ca
nop
cmp byte [esi], 0x20
jne 0x4173ca
inc esi
cmp esi, ebx
jb 0x4173c0
mov edi, esi
sub edi, ecx
push edi
push ecx
push dword [ebp - 0x22cc]
call fcn.00444290
add dword [ebp - 0x22cc], edi
add esp, 0xc
sub dword [ebp - 8], edi
push 0x13
push str.multipart_form_data
push esi
call fcn.00445e80
add esp, 0xc
test eax, eax
jne 0x41741d
mov eax, dword [ebp - 0x22cc]
add esi, 0x13
movq xmm0, qword [str.x_upload]
movq qword [eax], xmm0
add eax, 8
sub dword [ebp - 8], 8
mov dword [ebp - 0x22cc], eax
mov edi, ebx
sub edi, esi
push edi
push esi
mov esi, dword [ebp - 0x22cc]
push esi
call fcn.00444290
add esi, edi
add esp, 0xc
sub dword [ebp - 8], edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0x22cc], esi
cmp byte [ebx], 0xd
mov ecx, ebx
mov dword [ebp - 0x22d0], ebx
je 0x417350
mov edx, dword [ebp - 0x22d4]
mov eax, dword [edx + 0x1c]
test eax, eax
jle 0x41749d
push eax
push str._r_nContent_Length:__d
lea eax, [ebp - 0x34]
push 0x28
push eax
call fcn.0041c830
lea ebx, [ebp - 0x34]
add esp, 0x10
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x417478
sub ebx, ecx
cmp edi, ebx
jl 0x417497
push ebx
lea eax, [ebp - 0x34]
push eax
push esi
call fcn.00444290
add esp, 0xc
add esi, ebx
sub edi, ebx
mov edx, dword [ebp - 0x22d4]
cmp edi, 2
jl 0x4174ad
mov word [esi], 0xa0d
add esi, 2
sub edi, 2
mov eax, dword [edx]
push dword [eax + 0x6ec]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [ebp - 0x22d4]
mov ecx, dword [ebx]
mov eax, ecx
mov dword [ebp - 0x22e4], ecx
cmp dword [ecx + 8], 0
je 0x41759b
cmp dword [ecx + 0x728], 0
je 0x41759b
cmp byte [ebp - 0x20b8], 0x20
lea eax, [ebp - 0x10b8]
lea ebx, [ebp - 0xc]
mov dword [ebp - 0x22d0], eax
lea ecx, [ebp - 0x20b8]
je 0x417513
xor edx, edx
cmp edx, 7
jae 0x417513
mov al, byte [ecx]
inc edx
inc ecx
mov byte [ebx], al
inc ebx
cmp byte [ecx], 0x20
jne 0x417502
mov dl, byte [ecx + 1]
inc ecx
mov byte [ebx], 0
cmp dl, 0x20
je 0x417540
xor eax, eax
lea ebx, [ebp - 0x10b8]
cmp eax, 0xfff
jae 0x41753a
inc ecx
mov byte [ebx], dl
inc ebx
inc eax
mov dl, byte [ecx]
cmp dl, 0x20
jne 0x417527
mov dword [ebp - 0x22d0], ebx
mov eax, dword [ebp - 0x22d0]
mov edx, edi
mov ecx, dword [ebp - 0x22e4]
mov byte [eax], 0
lea eax, [ebp - 0x10b8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ecx + 0x744]
push eax
push dword [ecx + 0x730]
lea eax, [ecx + 0x734]
push dword [ecx + 0x72c]
push eax
push dword [ecx + 0x728]
push dword [ecx + 8]
mov ecx, esi
call fcn.00412350
mov ebx, dword [ebp - 0x22d4]
add esi, eax
add esp, 0x20
sub edi, eax
mov eax, dword [ebp - 0x22d4]
mov eax, dword [eax]
push dword [eax + 0x6ec]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
mov ebx, dword [eax + 4]
cmp edi, 6
jge 0x4175e7
mov eax, dword [ebp - 0x22dc]
test eax, eax
je 0x4175dd
push 0x40e
push str.ytcp
push str.I_O_error
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
mov ebx, 0xfffffff8
jmp 0x4176f1
push edi
push str.Host:
mov edx, edi
mov ecx, esi
call fcn.0041c8a0
mov ecx, ebx
lea edx, [edi - 6]
add esp, 8
lea eax, [ecx + 1]
mov dword [ebp - 0x22e4], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417607
sub ecx, dword [ebp - 0x22e4]
cmp edx, ecx
jge 0x41764e
mov eax, dword [ebp - 0x22dc]
test eax, eax
je 0x4175dd
push 0x415
push str.ytcp
push str.I_O_error
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
mov ebx, 0xfffffff8
jmp 0x4176f1
push edx
push ebx
lea ecx, [esi + 6]
call fcn.0041c8a0
mov ecx, ebx
add esp, 8
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417660
sub ecx, edx
lea eax, [ecx + 6]
mov ecx, ebx
add eax, esi
mov dword [ebp - 0x22e4], eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417680
sub ecx, edx
lea eax, [edi - 6]
sub eax, ecx
cmp eax, 2
jge 0x4176ca
mov eax, dword [ebp - 0x22dc]
test eax, eax
je 0x4175dd
push 0x41c
push str.ytcp
push str.I_O_error
push str._s___s:_d_
push 0x100
push eax
call fcn.0041c830
add esp, 0x18
mov ebx, 0xfffffff8
jmp 0x4176f1
mov ecx, dword [ebp - 0x22e4]
mov edx, eax
push eax
push 0x4f8c8c
call fcn.0041c8a0
add esp, 8
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4176e3
sub ebx, ecx
add ebx, 8
jns 0x417718
mov edi, dword [ebp - 0x22e0]
push dword [edi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x22d4]
mov ecx, 0x4f8c8c
push edi
mov edx, edi
test byte [eax + 0x158], 1
mov eax, str.Connection:_close_r_n_r_n
cmovne eax, ecx
lea ecx, [esi + ebx]
push eax
call fcn.0041c8a0
lea ecx, [ebp - 0x20b8]
add esp, 8
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x417750
mov edi, dword [ebp - 0x22e0]
sub ecx, edx
push dword [ebp - 0x22dc]
lea edx, [ebp - 0x20b8]
push ecx
mov ecx, dword [edi]
call fcn.00416570
mov esi, eax
add esp, 8
test esi, esi
js 0x417181
mov ebx, dword [ebp - 0x22d4]
mov eax, dword [ebx + 0x1c]
test eax, eax
jle 0x4177ab
push dword [ebp - 0x22dc]
mov edx, dword [ebx + 0x14]
mov ecx, dword [edi]
push eax
call fcn.00416570
mov esi, eax
add esp, 8
test esi, esi
js 0x417181
call fcn.00408c40
mov dword [ebx + 0x140], eax
mov eax, dword [ebx]
mov dword [ebx + 0x144], edx
cmp dword [eax + 0x94], 0xffffffff
je 0x417822
push 0
push 1
lea ecx, [ebp - 0x22d8]
mov byte [ebp - 0x22d8], 1
push ecx
push dword [eax + 0x98]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x417822
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x22dc]
test ecx, ecx
je 0x417082
push ecx
push eax
mov edx, 0x115
mov ecx, str.ytcp
call fcn.00415bd0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004423fe
mov esp, ebp
pop ebp
ret