Function at 0x10051260
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
add eax, 0x6a
push esi
push edi
push ebx
mov edi, dword [ebx]
lea eax, [ebx + eax*4]
mov esi, dword [ebx + 0x55c]
mov dword [ebp - 0x10], eax
mov eax, dword [eax]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], eax
mov byte [ebp - 1], 0
call fcn.10051cb0
add esp, 4
test al, al
jne 0x10051c88
mov byte [ebx + 0x2b6], al
jmp 0x100512b0
cmp dword [esi + 0x401c], 0
jne 0x10051513
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push edi
call fcn.1004dd00
push dword [edi + 0x140]
call dword [0x10196404]
add esp, 0x14
mov dword [edi + 0x140], 0
call fcn.10056200
mov ebx, eax
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x10051b58
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push str._s:_hu
call fcn.1004fdb0
add esp, 0xc
mov dword [ebp - 0x18], eax
test eax, eax
je 0x10051b4f
push 1
push eax
push str.CONNECT
push dword [ebp + 8]
call fcn.10056d50
push dword [ebp - 0x18]
mov ebx, eax
call dword [0x10196404]
add esp, 0x14
test ebx, ebx
jne 0x100514ec
mov edx, dword [ebp + 8]
mov ecx, 0x1014650c
mov eax, 0x10146508
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0x1013a3c4
cmp dword [edx + 0xf0], 1
cmovne eax, ecx
mov cl, byte [edx + 0x2a6]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x10]
cmp eax, dword [edx + 0xa0]
je 0x10051382
push 0x3a
push eax
call fcn.100217e0
add esp, 8
test eax, eax
setne cl
push dword [ebp + 0x14]
test cl, cl
mov edx, 0x1013a3c4
mov eax, 0x10145c3c
cmove eax, edx
push eax
push dword [ebp + 0x10]
mov eax, 0x10145c40
cmove eax, edx
push eax
push str._s_s_s:_hu
call fcn.1004fdb0
add esp, 0x14
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10051b2f
push str.Host:
push dword [ebp + 8]
call fcn.10056780
add esp, 8
test eax, eax
jne 0x100513ea
push dword [ebp - 0xc]
push str.Host:__s_r_n
call fcn.1004fdb0
mov ebx, eax
add esp, 8
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x10051b0f
push str.Proxy_Connection:
push dword [ebp + 8]
call fcn.10056780
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x1013a3c4
push str.User_Agent:
push dword [ebp + 8]
cmovne ecx, eax
mov dword [ebp - 0x20], ecx
call fcn.10056780
add esp, 0x10
test eax, eax
jne 0x10051431
cmp dword [edi + 0x450], eax
je 0x10051431
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2f8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
mov edx, 0x1013a3c4
push dword [ebp - 0x20]
mov ecx, edx
push dword [ebp - 0x14]
mov eax, dword [eax + 0x2f4]
test eax, eax
cmovne ecx, eax
mov eax, edx
push ecx
test ebx, ebx
cmovne eax, ebx
push eax
push dword [ebp - 0x24]
push dword [ebp - 0xc]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push dword [ebp - 8]
call fcn.100563c0
mov ebx, eax
add esp, 0x20
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1005147e
push eax
call dword [0x10196404]
add esp, 4
push dword [ebp - 0xc]
call dword [0x10196404]
add esp, 4
test ebx, ebx
jne 0x100514d5
push dword [ebp - 8]
push 1
push dword [ebp + 8]
call fcn.10056430
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x100514d5
push 0x1013a590
push dword [ebp - 8]
call fcn.100563c0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100514d5
push dword [ebp + 0xc]
push eax
lea eax, [edi + 0x4a30]
push eax
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.10056210
add esp, 0x14
mov ebx, eax
xor eax, eax
mov dword [ebp - 8], eax
test ebx, ebx
je 0x100514ef
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.1004dc30
add esp, 8
mov eax, dword [ebp - 8]
push eax
call fcn.100561d0
add esp, 4
test ebx, ebx
jne 0x10051b46
mov dword [esi + 0x4000], ebx
mov ebx, dword [ebp + 8]
mov dword [esi + 0x401c], 1
push 1
push 0
push edi
call fcn.1004ee50
add esp, 0xc
test edx, edx
jl 0x10051c91
jg 0x10051532
test eax, eax
je 0x10051c91
push dword [ebp + 0xc]
push ebx
call fcn.1004e4f0
add esp, 8
test al, al
je 0x10051c88
cmp dword [esi + 0x4004], 0
mov dword [ebp - 0x18], 0
je 0x10051a3b
lea edx, [esi + 0x4000]
mov eax, dword [esi + 0x400c]
cmp eax, edx
jae 0x10051b70
lea ecx, [ebp - 0x1c]
push ecx
push 1
push eax
push dword [ebp - 0x28]
push ebx
call fcn.1004dd80
mov ebx, eax
add esp, 0x14
cmp ebx, 0x51
je 0x10051c88
push dword [ebp + 8]
call fcn.10059200
add esp, 4
test eax, eax
jne 0x10051b64
test ebx, ebx
jne 0x10051a2e
cmp dword [ebp - 0x1c], ebx
jle 0x10051a80
cmp dword [esi + 0x4004], 1
jle 0x10051656
mov ecx, dword [esi + 0x4010]
mov eax, ecx
mov edx, dword [esi + 0x4014]
or eax, edx
mov dword [esi + 0x400c], esi
je 0x10051613
sub ecx, 1
mov dword [esi + 0x4010], ecx
sbb edx, ebx
mov dword [esi + 0x4014], edx
test edx, edx
jl 0x10051a24
jg 0x100515f8
test ecx, ecx
jbe 0x10051a24
mov ebx, dword [ebp + 8]
lea edx, [esi + 0x4000]
cmp dword [esi + 0x4004], 0
jne 0x10051560
jmp 0x10051a3b
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
push 1
push esi
push ebx
mov dword [ebp - 0x24], 0
call fcn.10071230
add esp, 0x10
cmp eax, 0xffffffff
jne 0x100515fb
push str.chunk_reading_DONE_n
push edi
call fcn.1004dd00
add esp, 8
mov dword [esi + 0x4004], 0
mov dword [esi + 0x401c], 2
jmp 0x100515fb
mov eax, dword [esi + 0x400c]
lea edx, [esi + 0x4000]
inc dword [edx]
mov ebx, dword [ebp + 8]
cmp byte [eax], 0xa
je 0x10051675
inc eax
mov dword [esi + 0x400c], eax
jmp 0x10051601
cmp byte [edi + 0x390], 0
je 0x10051698
push ebx
push dword [edx]
push dword [esi + 0x4008]
push 1
push edi
call fcn.1004db50
add esp, 0x14
lea edx, [esi + 0x4000]
cmp byte [edi + 0x4f4], 0
jne 0x100516d5
push dword [edx]
cmp byte [edi + 0x385], 0
mov ecx, 3
push dword [esi + 0x4008]
mov eax, 2
cmovne eax, ecx
push eax
push ebx
call fcn.1004db20
add esp, 0x10
test eax, eax
jne 0x10051ca4
lea edx, [esi + 0x4000]
mov eax, dword [edx]
add dword [edi + 0x4a2c], eax
mov eax, dword [edx]
add dword [edi + 0xa0], eax
mov ecx, dword [esi + 0x4008]
mov al, byte [ecx]
cmp al, 0xd
je 0x1005191d
cmp al, 0xa
je 0x1005191d
mov eax, dword [edx]
push 0x11
mov byte [ecx + eax], 0
push dword [esi + 0x4008]
push str.WWW_Authenticate:
call fcn.1005a610
add esp, 0xc
test eax, eax
je 0x10051729
mov eax, dword [edi + 0xf8]
cmp eax, 0x191
je 0x1005174f
push 0x13
push dword [esi + 0x4008]
push str.Proxy_authenticate:
call fcn.1005a610
add esp, 0xc
test eax, eax
je 0x10051799
mov eax, dword [edi + 0xf8]
cmp eax, 0x197
jne 0x10051799
push dword [esi + 0x4008]
cmp eax, 0x197
sete byte [ebp - 0x2c]
call fcn.10056910
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10051b58
push ebx
push dword [ebp - 0x2c]
push dword [ebp + 8]
call fcn.10056bb0
push ebx
mov dword [ebp - 0x24], eax
call dword [0x10196404]
mov eax, dword [ebp - 0x24]
add esp, 0x10
test eax, eax
jne 0x10051ca4
jmp 0x100518fd
push 0xf
push dword [esi + 0x4008]
push str.Content_Length:
call fcn.1005a610
add esp, 0xc
test eax, eax
je 0x10051809
mov ecx, dword [edi + 0xf8]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x100517e2
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push edi
call fcn.1004dd00
add esp, 0xc
jmp 0x100518fd
mov eax, dword [esi + 0x4008]
push 0xa
add eax, 0xf
push 0
push eax
call fcn.10033c3b
add esp, 0xc
mov dword [esi + 0x4010], eax
mov dword [esi + 0x4014], edx
jmp 0x100518fd
push str.close
push str.Connection:
push dword [esi + 0x4008]
call fcn.10056840
add esp, 0xc
test al, al
je 0x1005182e
mov byte [ebp - 1], 1
jmp 0x100518fd
push 0x12
push dword [esi + 0x4008]
push str.Transfer_Encoding:
call fcn.1005a610
add esp, 0xc
test eax, eax
je 0x100518b0
mov ecx, dword [edi + 0xf8]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x10051877
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push edi
call fcn.1004dd00
add esp, 0xc
jmp 0x100518fd
push str.chunked
push str.Transfer_Encoding:
push dword [esi + 0x4008]
call fcn.10056840
add esp, 0xc
test al, al
je 0x100518fd
push str.CONNECT_responded_chunked_n
push edi
call fcn.1004dd00
push ebx
mov byte [esi + 0x4018], 1
call fcn.10071210
add esp, 0xc
jmp 0x100518fd
push str.close
push str.Proxy_Connection:
push dword [esi + 0x4008]
call fcn.10056840
add esp, 0xc
test al, al
je 0x100518d2
mov byte [ebp - 1], 1
jmp 0x100518fd
lea ebx, [edi + 0xf8]
push ebx
lea eax, [ebp - 0x30]
push eax
push str.HTTP_1._d__d
push dword [esi + 0x4008]
call fcn.100230cb
add esp, 0x10
cmp eax, 2
jne 0x100518fd
mov eax, dword [ebx]
mov dword [edi + 0x4a1c], eax
mov ebx, dword [ebp + 8]
lea edx, [esi + 0x4000]
mov dword [edx], 0
mov dword [esi + 0x400c], esi
mov dword [esi + 0x4008], esi
jmp 0x10051601
mov dword [esi + 0x400c], esi
cmp dword [edi + 0xf8], 0x197
jne 0x10051a15
cmp byte [edi + 0x47ac], 0
jne 0x10051a15
mov edx, dword [esi + 0x4010]
mov eax, edx
mov ecx, dword [esi + 0x4014]
or eax, ecx
mov dword [esi + 0x4004], 2
je 0x10051993
push ecx
push edx
push str.Ignore__I64d_bytes_of_response_body_n
push edi
call fcn.1004dd00
add esp, 0x10
lea edx, [esi + 0x4000]
mov eax, dword [esi + 0x4010]
or eax, dword [esi + 0x4014]
jne 0x10051601
mov dword [esi + 0x401c], 2
jmp 0x10051601
cmp byte [esi + 0x4018], 0
je 0x10051a06
push str.Ignore_chunked_response_body_n
push edi
call fcn.1004dd00
mov byte [edi + 0x139], 1
add esp, 8
mov eax, dword [esi + 0x4008]
inc eax
cmp byte [eax], 0xa
jne 0x100519c3
mov dword [esi + 0x4008], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [esi + 0x4008]
push 1
inc eax
push eax
push ebx
call fcn.10071230
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1005196c
push str.chunk_reading_DONE_n
push edi
call fcn.1004dd00
add esp, 8
mov dword [esi + 0x4004], 0
mov dword [esi + 0x401c], 2
jmp 0x1005196c
mov dword [esi + 0x4004], 0
jmp 0x1005196c
mov dword [esi + 0x4004], 0
jmp 0x10051972
mov dword [esi + 0x401c], 2
mov ebx, dword [ebp + 8]
mov dword [esi + 0x4004], 0
push ebx
call fcn.10059200
add esp, 4
test eax, eax
jne 0x10051b64
cmp dword [ebp - 0x18], eax
jne 0x10051c39
cmp dword [edi + 0x4a1c], 0xc8
je 0x10051ac9
push ebx
call fcn.100569e0
add esp, 4
test eax, eax
jne 0x10051ca4
cmp byte [ebx + 0x29d], al
je 0x10051ac9
mov byte [ebp - 1], 1
jmp 0x10051acf
cmp dword [edi + 0x180], 0
je 0x10051aac
cmp dword [edi + 0x47a4], 0
je 0x10051aac
mov ebx, dword [ebp + 8]
push str.Proxy_CONNECT_connection_closed_n
push edi
mov byte [ebx + 0x2b6], 1
call fcn.1004dd00
add esp, 8
jmp 0x10051a31
push str.Proxy_CONNECT_aborted
push edi
mov dword [ebp - 0x18], 1
call fcn.1004dc30
mov ebx, dword [ebp + 8]
add esp, 8
jmp 0x10051a31
cmp byte [ebp - 1], 0
je 0x10051adc
cmp dword [edi + 0x140], 0
jne 0x10051b8a
cmp dword [edi + 0x140], 0
je 0x10051ba1
cmp dword [esi + 0x401c], 2
jne 0x10051afd
push 1
push ebx
call fcn.10051ee0
add esp, 8
cmp dword [edi + 0x140], 0
jne 0x100512b0
jmp 0x10051ba1
push dword [ebp - 0xc]
call dword [0x10196404]
push dword [ebp - 8]
call fcn.100561d0
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 8]
call fcn.100561d0
add esp, 4
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100561d0
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov esp, ebp
pop ebp
ret
push str.CONNECT_response_too_large_
push edi
call fcn.1004dc30
add esp, 8
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
push dword [eax]
push ebx
call fcn.1004e490
mov eax, dword [ebp - 0x10]
add esp, 8
mov dword [eax], 0xffffffff
cmp dword [edi + 0xf8], 0xc8
je 0x10051c45
cmp byte [ebp - 1], 0
je 0x10051bdd
cmp dword [edi + 0x140], 0
je 0x10051bdd
push str.Connect_me_again_please_n
push edi
mov byte [ebx + 0x2b6], 1
call fcn.1004dd00
push ebx
call fcn.10051eb0
add esp, 0xc
jmp 0x10051c12
push dword [edi + 0x140]
call dword [0x10196404]
push 2
push ebx
mov dword [edi + 0x140], 0
call fcn.1004e5a0
mov eax, dword [ebp - 0x10]
push dword [eax]
push ebx
call fcn.1004e490
mov eax, dword [ebp - 0x10]
add esp, 0x14
mov dword [eax], 0xffffffff
mov dword [esi + 0x401c], 0
cmp byte [ebx + 0x2b6], 0
jne 0x10051c88
push dword [edi + 0xf8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.1004dc30
add esp, 0xc
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x401c], 2
push dword [ebx + 0x2f4]
call dword [0x10196404]
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [ebx + 0x2f4], 0
push edi
mov byte [edi + 0x47a8], 1
call fcn.1004dd00
mov byte [edi + 0x139], 0
add esp, 0xc
mov byte [ebx + 0x2af], 0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.1004dc30
mov eax, 0x1c
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret