Function at 0x50e870
Capabilities:
Make an http request with a cookie
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ad176
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 0x50], esi
mov eax, dword [esi + 0x80]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
cmp byte [eax + 0x172], bl
jne 0x50e8e6
mov ecx, dword [esi + 0x3174]
cmp ecx, ebx
je 0x50e8c1
cmp dword [esi + 0x3178], ebx
je 0x50e8e6
lea edx, [esi + 0x3170]
push ebx
push edx
lea edx, [esi + 0x3178]
push edx
mov edx, dword [eax + 0x10]
push edx
mov edx, dword [eax + 0xc]
push edx
add eax, 0x19c
push ecx
push eax
mov ecx, esi
call fcn.00514970
mov eax, dword [ebp + 8]
push 1
cmp eax, ebx
je 0x50e8f7
mov eax, dword [0x664568]
push eax
jmp 0x50e8fe
mov ecx, dword [0x664564]
push ecx
mov ecx, esi
call fcn.004f89b0
mov ecx, esi
call fcn.00513460
mov ecx, esi
call fcn.00513ad0
cmp eax, ebx
jne 0x50ef90
mov al, byte [esi + 0x30d3]
mov dword [ebp - 0x20], ebx
cmp al, bl
je 0x50e941
lea edx, [ebp - 0x9c]
push str.Range:_bytes0__r_n
push edx
call fcn.0056d05a
add esp, 8
jmp 0x50ea4d
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x20]
cmp eax, ebx
jg 0x50e970
jl 0x50e951
cmp ecx, ebx
ja 0x50e970
lea eax, [ebp - 0x9c]
push 0x663188
push eax
call fcn.0056d05a
add esp, 8
mov byte [esi + 0x30d0], bl
jmp 0x50ea4d
mov edx, dword [esi + 0x30cc]
cmp edx, ebx
je 0x50e97f
mov edx, dword [edx + 0x68]
jmp 0x50e981
xor edx, edx
mov edi, dword [esi + 0x18]
or edi, dword [esi + 0x1c]
je 0x50ea0f
cmp edx, ebx
je 0x50ea0f
mov edx, dword [esi + 0x80]
cmp dword [edx + 0x2a0], ebx
je 0x50ea0f
mov ecx, esi
call fcn.00513a40
mov edi, eax
mov eax, dword [esi + 0x30cc]
cmp eax, ebx
je 0x50e9d4
cmp byte [eax + 0x1c8], bl
jne 0x50e9cf
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
sub ecx, 1
sbb eax, ebx
cmp eax, edx
jl 0x50e9d4
jg 0x50e9cf
cmp ecx, edi
jbe 0x50e9d4
add edi, 1
adc edx, ebx
mov al, byte [esi + 0x90]
cmp al, bl
mov eax, dword [esi + 0x20]
je 0x50e9eb
mov ecx, dword [esi + 0x24]
add eax, 0x30
adc ecx, ebx
jmp 0x50e9ee
mov ecx, dword [esi + 0x24]
push edx
push edi
push ecx
push eax
lea eax, [ebp - 0x9c]
push str.Range:_bytes_I64d__I64d_r_n
push eax
call fcn.0056d05a
add esp, 0x18
mov byte [esi + 0x3125], 1
jmp 0x50ea4d
mov edx, dword [esi + 0x80]
cmp dword [edx + 0x2a0], ebx
jne 0x50ea24
mov dword [ebp - 0x20], 1
cmp byte [esi + 0x90], bl
je 0x50ea31
add ecx, 0x30
adc eax, ebx
push eax
push ecx
lea eax, [ebp - 0x9c]
push str.Range:_bytes_I64d__r_n
push eax
call fcn.0056d05a
add esp, 0x10
mov byte [esi + 0x3125], bl
mov eax, dword [esi + 0x84]
cmp eax, ebx
je 0x50ea5c
mov ecx, dword [eax + 0xc]
jmp 0x50ea65
mov ecx, dword [esi + 0x80]
mov ecx, dword [ecx + 0x14]
cmp eax, ebx
je 0x50ea6e
mov eax, dword [eax + 0x10]
jmp 0x50ea77
mov edx, dword [esi + 0x80]
mov eax, dword [edx + 0x24]
cmp ecx, 0x50
mov dword [ebp - 0x48], eax
jne 0x50ead4
cmp eax, 1
je 0x50eae1
push ecx
lea ecx, [ebp - 0x5c]
push str.:_ld
push ecx
call fcn.0056d05a
add esp, 0xc
mov edx, dword [0x65ec1c]
mov dword [ebp - 0x1c], edx
mov eax, dword [esi + 0x80]
mov byte [ebp - 4], 1
cmp byte [eax + 0x2bc], bl
je 0x50eab9
cmp byte [eax + 0x2be], bl
jne 0x50eaf4
mov eax, dword [eax + 0x18]
cmp eax, ebx
je 0x50eaf4
push eax
lea eax, [ebp - 0x1c]
push str.Referer:__s_r_n
push eax
call fcn.0058148b
add esp, 0xc
jmp 0x50eb01
cmp ecx, 0x1bb
jne 0x50ea84
cmp eax, 2
jne 0x50ea84
lea eax, [ebp - 0x5c]
push 0x663188
push eax
call fcn.0056d05a
add esp, 8
jmp 0x50ea96
push 0x663188
lea ecx, [ebp - 0x1c]
call fcn.00588849
push 0x663188
lea ecx, [ebp - 0x30]
call fcn.0058872e
mov eax, dword [esi + 0x80]
mov byte [ebp - 4], 2
cmp byte [eax + 0x2c1], bl
je 0x50eb75
mov edi, dword [eax + 0x20]
cmp edi, ebx
je 0x50eb75
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jle 0x50eb75
mov edx, dword [esi + 0x80]
mov eax, dword [edx + 0x20]
mov dl, byte [eax + ecx - 1]
cmp dl, 0xa
lea eax, [eax + ecx - 1]
je 0x50eb51
cmp dl, 0xd
jne 0x50eb55
mov byte [eax], bl
jmp 0x50eb30
cmp ecx, 1
jle 0x50eb75
mov ecx, dword [esi + 0x80]
lea eax, [ebp - 0x30]
mov edx, dword [ecx + 0x20]
push edx
push str.If_Modified_Since:__s_r_n
push eax
call fcn.0058148b
add esp, 0xc
mov ecx, dword [0x65ec1c]
mov dword [ebp - 0x18], ecx
mov edx, dword [esi + 0x80]
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 4], 3
mov edi, dword [edx + 0xd0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x50ebb4
mov edx, dword [edx + 0xd0]
lea eax, [ebp - 0x18]
push edx
push 0x638fa8
push eax
call fcn.0058148b
add esp, 0xc
jmp 0x50ebc5
lea ecx, [ebp - 0x18]
push str.application_x_www_form_urlencoded
push ecx
call fcn.0058148b
add esp, 8
mov edx, dword [0x65ec1c]
mov dword [ebp - 0x24], edx
mov eax, dword [esi + 0x80]
mov byte [ebp - 4], 4
cmp byte [eax + 0x15b], bl
je 0x50ebff
mov eax, dword [eax + 0x15c]
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x24]
mov eax, dword [eax - 8]
push eax
push ecx
push str.Content_Type:__s_r_nContent_Length:__d_r_n
push edx
call fcn.0058148b
add esp, 0x10
mov eax, dword [esi + 0x80]
cmp byte [eax + 0x16c], bl
je 0x50ec29
mov eax, dword [eax + 0x168]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
lea edx, [ebp - 0x24]
push str.Content_Type:__s_r_nContent_Length:__d_r_n
push edx
call fcn.0058148b
add esp, 0x10
mov eax, dword [0x65ec1c]
mov dword [ebp - 0x2c], eax
mov edx, dword [esi + 0x80]
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 4], 5
mov edi, dword [edx + 0x2cc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x50ec65
mov ecx, dword [edx + 0x2cc]
lea edx, [ebp - 0x2c]
push ecx
push str.Cookie2:__s_r_n
push edx
call fcn.0058148b
add esp, 0xc
mov eax, dword [0x65ec1c]
mov dword [ebp - 0x34], eax
mov edx, dword [esi + 0x80]
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 4], 6
mov edi, dword [edx + 0x2d0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x50eca1
mov ecx, dword [edx + 0x2d0]
lea edx, [ebp - 0x34]
push ecx
push str.Accept_Language:__s_r_n
push edx
call fcn.0058148b
add esp, 0xc
mov eax, dword [0x65ec1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], 7
cmp eax, ebx
je 0x50ecc2
mov dword [ebp - 0x20], str.Cache_Control:_no_cache_r_nPragma:_no_cache_r_n
mov ecx, 0x663188
jmp 0x50ecca
mov ecx, 0x663188
mov dword [ebp - 0x20], ecx
mov eax, dword [esi + 0x30e0]
mov dword [ebp - 0x38], 0x639b3c
cmp eax, ebx
jne 0x50ecde
mov dword [ebp - 0x38], ecx
cmp eax, ebx
mov dword [ebp - 0x44], eax
jne 0x50ece8
mov dword [ebp - 0x44], ecx
cmp eax, ebx
mov dword [ebp - 0x3c], str.Cookie:
jne 0x50ecf6
mov dword [ebp - 0x3c], ecx
mov ecx, dword [esi + 0x80]
cmp byte [ecx + 0x172], bl
je 0x50ed1f
mov edx, dword [esi + 0x30ec]
lea ecx, [ebp - 0x54]
push edx
call fcn.0058872e
or dword [ebp - 0x14], 1
mov edi, dword [eax]
mov byte [ebp - 4], 8
jmp 0x50ed25
mov edi, dword [esi + 0x3170]
mov eax, dword [esi + 0x3170]
cmp dword [eax - 8], ebx
je 0x50ed59
mov ecx, dword [esi + 0x80]
cmp byte [ecx + 0x172], bl
sete al
cmp al, bl
je 0x50ed59
mov edx, dword [esi + 0x3174]
mov dword [ebp - 0x40], str.Connection:_Keep_Alive_r_n
cmp edx, ebx
sete al
cmp al, bl
jne 0x50ed60
mov dword [ebp - 0x40], 0x663188
mov eax, dword [esi + 0x84]
cmp eax, ebx
jne 0x50ed86
mov edx, dword [esi + 0x80]
lea ecx, [ebp - 0x4c]
mov eax, dword [edx]
push eax
call fcn.0058872e
or dword [ebp - 0x14], 2
mov dword [ebp - 4], 9
mov edx, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [esi + 0x80]
cmp edx, ebx
je 0x50ed9c
mov edx, str.HEAD
jmp 0x50edb8
cmp byte [eax + 0x15b], bl
jne 0x50edb3
mov dl, byte [eax + 0x16c]
cmp dl, bl
mov edx, 0x65458c
je 0x50edb8
mov edx, str.POST
mov ebx, dword [eax + 0x15c]
push ebx
mov ebx, dword [ebp - 0x20]
push ebx
mov ebx, dword [ebp - 0x24]
push ebx
mov ebx, dword [ebp - 0x2c]
push ebx
mov ebx, dword [ebp - 0x38]
push ebx
mov ebx, dword [ebp - 0x44]
push ebx
mov ebx, dword [ebp - 0x3c]
push ebx
push edi
mov edi, dword [ebp - 0x1c]
push edi
lea edi, [ebp - 0x9c]
push edi
mov edi, dword [ebp - 0x30]
push edi
mov edi, dword [ebp - 0x40]
push edi
mov edi, dword [ebp - 0x34]
push edi
lea edi, [ebp - 0x5c]
push edi
push ecx
mov ecx, dword [eax + 0x160]
mov eax, dword [esi + 0x30dc]
push ecx
push 0x663188
push eax
push edx
lea ecx, [ebp - 0x28]
push str._s__s_HTTP_1.1_r_n_sUser_Agent:__s_r_nHost:__s_s_r_nAccept:___r_n_s_s_s_s_s_s_s_s_s_s_s_s_r_n_s
push ecx
call fcn.0058148b
mov ebx, dword [ebp - 0x14]
add esp, 0x54
test bl, 2
mov dword [ebp - 4], 8
je 0x50ee36
and ebx, 0xfffffffd
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x14], ebx
call fcn.005886c0
test bl, 1
mov dword [ebp - 4], 7
je 0x50ee4a
lea ecx, [ebp - 0x54]
call fcn.005886c0
mov ecx, esi
mov dword [esi + 0x30c8], 1
call fcn.004f9770
mov eax, dword [ebp - 0x48]
mov ebx, 4
cmp eax, 2
mov dword [esi + 0x5c], ebx
jne 0x50eeb0
mov edx, dword [ebp - 0x28]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.00553eb0
mov edi, eax
mov eax, dword [esi + 0x80]
mov cl, byte [eax + 0x16c]
test cl, cl
je 0x50ef12
mov ecx, dword [eax + 0x164]
test ecx, ecx
je 0x50ef12
mov edx, dword [eax + 0x168]
push edx
push ecx
mov ecx, esi
call fcn.00553eb0
jmp 0x50ef12
mov eax, dword [ebp + 8]
mov edx, str.send___HEAD
test eax, eax
jne 0x50eec1
mov edx, str.send___GET
mov eax, dword [ebp - 0x28]
push edx
push 0
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esi + 0x30c4]
push eax
call sub.WSOCK32.dll_send
push eax
mov ecx, esi
call fcn.004f8b20
mov edi, eax
mov eax, dword [esi + 0x80]
mov cl, byte [eax + 0x16c]
test cl, cl
je 0x50ef12
mov ecx, dword [eax + 0x164]
test ecx, ecx
je 0x50ef12
mov edx, dword [eax + 0x168]
mov eax, dword [esi + 0x30c4]
push 0
push edx
push ecx
push eax
call sub.WSOCK32.dll_send
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call fcn.005886c0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 5
call fcn.005886c0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.005886c0
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.005886c0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.005886c0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.005886c0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.005886c0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4