Function at 0x1003c040
Capabilities:
Check http status code

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x30]
push ebx
mov ebx, dword [esp + 0x3c]
push ebp
push esi
push edi
mov edi, dword [esp + 0x3c]
mov edx, dword [edi + eax*4 + 0x1c0]
mov ebp, dword [edi]
mov esi, dword [edi + 0x618]
xor ecx, ecx
push edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], edx
call fcn.1003bf50
add esp, 4
test eax, eax
jne 0x1003cb11
mov dword [edi + 0x32c], ecx
cmp dword [esi + 0x4018], 0
jne 0x1003c2f5
mov edi, dword [esp + 0x44]
push ebx
push edi
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push ebp
call fcn.10013910
mov eax, dword [ebp + 0x140]
push eax
call dword [0x10072004]
add esp, 0x14
mov dword [ebp + 0x140], 0
call fcn.10032c50
test eax, eax
mov dword [esp + 0x10], eax
je 0x1003c943
push ebx
push edi
push str._s:_d
call fcn.1001d170
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x1003c936
mov ecx, dword [esp + 0x3c]
push 1
push ebx
push str.CONNECT
push ecx
call fcn.10032790
push ebx
mov edi, eax
call dword [0x10072004]
add esp, 0x14
test edi, edi
jne 0x1003c2cc
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x3c]
cmp dword [edi + 0xf0], 1
mov eax, 0x1006e797
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], 0x10066ee8
je 0x1003c139
mov dword [esp + 0x20], 0x10066eec
mov ebx, dword [esp + 0x44]
cmp ebx, dword [edi + 0x9c]
mov eax, dword [edi + 0x2f4]
je 0x1003c15c
push 0x3a
push ebx
call fcn.1004cd50
add esp, 8
neg eax
sbb eax, eax
neg eax
test eax, eax
je 0x1003c16c
mov ecx, 0x10061ac8
mov eax, 0x10061abc
jmp 0x1003c173
mov ecx, 0x1006e797
mov eax, ecx
mov edx, dword [esp + 0x48]
push edx
push ecx
push ebx
push eax
push str._s_s_s:_d
call fcn.1001d170
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x1003c950
push str.Host
push edi
call fcn.100320c0
add esp, 8
test eax, eax
jne 0x1003c1be
push ebx
push str.Host:__s_r_n
call fcn.1001d170
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
je 0x1003c96a
push str.Proxy_Connection
push edi
call fcn.100320c0
add esp, 8
test eax, eax
jne 0x1003c1d8
mov dword [esp + 0x18], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
push edi
call fcn.100320c0
add esp, 8
test eax, eax
jne 0x1003c1fc
cmp dword [ebp + 0xa1c], eax
je 0x1003c1fc
mov eax, dword [edi + 0x3a0]
mov dword [esp + 0x1c], eax
mov edi, dword [edi + 0x39c]
test edi, edi
mov ecx, edi
jne 0x1003c20d
mov ecx, 0x1006e797
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x1003c21a
mov eax, 0x1006e797
mov edx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push edx
push ecx
push eax
mov eax, dword [esp + 0x30]
push eax
push ebx
lea ecx, [esp + 0x28]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ecx
call fcn.10033810
add esp, 0x20
cmp dword [esp + 0x14], 0
mov edi, eax
je 0x1003c255
mov edx, dword [esp + 0x14]
push edx
call dword [0x10072004]
add esp, 4
push ebx
call dword [0x10072004]
add esp, 4
test edi, edi
jne 0x1003c2b2
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x3c]
push eax
push 1
push ebx
call fcn.10033a80
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x1003c2b2
lea ecx, [esp + 0x10]
push 0x10062470
push ecx
call fcn.10033810
mov edi, eax
add esp, 8
test edi, edi
jne 0x1003c2b2
mov edx, dword [esp + 0x40]
push edx
push eax
lea eax, [ebp + 0x1180]
push eax
lea ecx, [esp + 0x1c]
push ebx
push ecx
call fcn.10032c90
add esp, 0x14
mov edi, eax
test edi, edi
mov dword [esp + 0x10], 0
je 0x1003c2cc
push str.Failed_sending_CONNECT_to_proxy
push ebp
call fcn.10013a00
add esp, 8
lea edx, [esp + 0x10]
push edx
call fcn.10032c60
add esp, 4
test edi, edi
jne 0x1003c98b
mov dword [esi + 0x4000], edi
mov edi, dword [esp + 0x3c]
mov dword [esi + 0x4018], 1
push 1
push 0
push ebp
call fcn.10018250
add esp, 0xc
test edx, edx
jl 0x1003c995
jg 0x1003c314
test eax, eax
jbe 0x1003c995
mov eax, dword [esp + 0x40]
push eax
push edi
call fcn.10019010
add esp, 8
test eax, eax
je 0x1003cb11
cmp dword [esi + 0x4004], 0
mov dword [esp + 0x20], 0
je 0x1003c40a
lea ebx, [esi + 0x4000]
jmp 0x1003c350
mov eax, dword [esi + 0x400c]
cmp eax, ebx
jae 0x1003c9b0
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push ecx
push 1
push eax
mov eax, dword [esp + 0x48]
push edx
push eax
call fcn.10013810
mov edi, eax
add esp, 0x14
cmp edi, 0x51
je 0x1003cb11
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.10021300
add esp, 4
test eax, eax
jne 0x1003c9cb
test edi, edi
jne 0x1003c3fc
cmp dword [esp + 0x24], edi
jle 0x1003c8e8
cmp dword [esi + 0x4004], 1
jle 0x1003c506
mov eax, dword [esi + 0x4010]
mov ecx, dword [esi + 0x4014]
mov edx, eax
or edx, ecx
mov dword [esi + 0x400c], esi
je 0x1003c4b4
sub eax, 1
sbb ecx, edi
test ecx, ecx
mov dword [esi + 0x4010], eax
mov dword [esi + 0x4014], ecx
jl 0x1003c3f2
jg 0x1003c8d6
test eax, eax
ja 0x1003c8d6
mov dword [esi + 0x4018], 2
mov dword [esi + 0x4004], 0
mov edi, dword [esp + 0x3c]
push edi
call fcn.10021300
add esp, 4
test eax, eax
jne 0x1003c9cb
cmp dword [esp + 0x20], eax
jne 0x1003c9be
mov ecx, dword [ebp + 0x1164]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
je 0x1003c464
push edi
call fcn.100335e0
add esp, 4
test eax, eax
jne 0x1003cb13
cmp dword [edi + 0x2cc], eax
je 0x1003c464
mov dword [esi + 0x4020], 1
cmp dword [esi + 0x4020], 0
je 0x1003c47a
cmp dword [ebp + 0x140], 0
jne 0x1003c9d8
cmp dword [ebp + 0x140], 0
je 0x1003c9fa
cmp dword [esi + 0x4018], 2
jne 0x1003c49e
mov edi, dword [esp + 0x3c]
push 1
call fcn.1003bf90
add esp, 4
cmp dword [ebp + 0x140], 0
je 0x1003c9fa
mov ebx, dword [esp + 0x48]
jmp 0x1003c083
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x20]
push ecx
push 1
push esi
push edx
mov dword [esp + 0x30], 0
call fcn.10040ea0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1003c8d6
push str.chunk_reading_DONE_n
push ebp
call fcn.10013910
add esp, 8
mov dword [esi + 0x4004], 0
mov dword [esi + 0x4018], 2
jmp 0x1003c8d6
add dword [ebx], 1
mov eax, dword [esi + 0x400c]
cmp byte [eax], 0xa
mov ecx, dword [ebx]
je 0x1003c524
add eax, 1
mov dword [esi + 0x400c], eax
jmp 0x1003c8d6
cmp dword [ebp + 0xb64], 0
je 0x1003c540
mov eax, dword [esi + 0x4008]
push ecx
push eax
push 1
push ebp
call fcn.10013880
add esp, 0x10
cmp dword [ebp + 0xbb4], 0
jne 0x1003c57c
cmp dword [ebp + 0xb50], 0
mov eax, 2
je 0x1003c55c
mov eax, 3
mov ecx, dword [ebx]
mov edx, dword [esi + 0x4008]
push ecx
push edx
push eax
mov eax, dword [esp + 0x48]
push eax
call fcn.10013e60
add esp, 0x10
test eax, eax
jne 0x1003cb13
mov eax, dword [ebx]
cdq
add dword [ebp + 0x1178], eax
adc dword [ebp + 0x117c], edx
mov eax, dword [ebx]
cdq
add dword [ebp + 0xa8], eax
adc dword [ebp + 0xac], edx
mov eax, dword [esi + 0x4008]
mov cl, byte [eax]
cmp cl, 0xd
je 0x1003c7eb
cmp cl, 0xa
je 0x1003c7eb
mov ecx, dword [ebx]
mov byte [eax + ecx], 0
mov edx, dword [esi + 0x4008]
push 0x11
push edx
push str.WWW_Authenticate:
call fcn.1001a5e0
add esp, 0xc
test eax, eax
je 0x1003c5e1
mov eax, dword [ebp + 0x100]
cmp eax, 0x191
je 0x1003c608
mov eax, dword [esi + 0x4008]
push 0x13
push eax
push str.Proxy_authenticate:
call fcn.1001a5e0
add esp, 0xc
test eax, eax
je 0x1003c655
mov eax, dword [ebp + 0x100]
cmp eax, 0x197
jne 0x1003c655
mov ecx, dword [esi + 0x4008]
xor ebx, ebx
cmp eax, 0x197
push ecx
sete bl
call fcn.10032140
mov edi, eax
add esp, 4
test edi, edi
je 0x1003c943
mov edx, dword [esp + 0x3c]
push edi
push ebx
push edx
call fcn.100328a0
push edi
mov ebx, eax
call dword [0x10072004]
add esp, 0x10
test ebx, ebx
je 0x1003c7ce
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x28
ret
mov eax, dword [esi + 0x4008]
push 0xf
push eax
push str.Content_Length:
call fcn.1001a5e0
add esp, 0xc
test eax, eax
je 0x1003c6c1
mov ecx, dword [ebp + 0x100]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x1003c69f
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push ebp
call fcn.10013910
add esp, 0xc
jmp 0x1003c7ce
mov edx, dword [esi + 0x4008]
lea ecx, [esi + 0x4010]
push ecx
push 0xa
add edx, 0xf
push 0
push edx
call fcn.1003efc0
add esp, 0x10
jmp 0x1003c7ce
mov eax, dword [esi + 0x4008]
push str.close
push str.Connection:
push eax
call fcn.10032f90
add esp, 0xc
test eax, eax
je 0x1003c6ed
mov dword [esi + 0x4020], 1
jmp 0x1003c7ce
mov ecx, dword [esi + 0x4008]
push 0x12
push ecx
push str.Transfer_Encoding:
call fcn.1001a5e0
add esp, 0xc
test eax, eax
je 0x1003c778
mov ecx, dword [ebp + 0x100]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x1003c737
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push ebp
call fcn.10013910
add esp, 0xc
jmp 0x1003c7ce
mov ecx, dword [esi + 0x4008]
push str.chunked
push str.Transfer_Encoding:
push ecx
call fcn.10032f90
add esp, 0xc
test eax, eax
je 0x1003c7ce
push str.CONNECT_responded_chunked_n
push ebp
call fcn.10013910
mov edx, dword [esp + 0x44]
push edx
mov dword [esi + 0x401c], 1
call fcn.10040e90
add esp, 0xc
jmp 0x1003c7ce
mov eax, dword [esi + 0x4008]
push str.close
push str.Proxy_Connection:
push eax
call fcn.10032f90
add esp, 0xc
test eax, eax
je 0x1003c7a1
mov dword [esi + 0x4020], 1
jmp 0x1003c7ce
mov edx, dword [esi + 0x4008]
lea edi, [ebp + 0x100]
push edi
lea ecx, [esp + 0x30]
push ecx
push str.HTTP_1._d__d
push edx
call fcn.1004da42
add esp, 0x10
cmp eax, 2
jne 0x1003c7ce
mov eax, dword [edi]
mov dword [ebp + 0x1164], eax
lea ebx, [esi + 0x4000]
mov dword [ebx], 0
mov dword [esi + 0x400c], esi
mov dword [esi + 0x4008], esi
jmp 0x1003c8d6
mov dword [esi + 0x400c], esi
cmp dword [ebp + 0x100], 0x197
jne 0x1003c8b3
cmp dword [ebp + 0x1110], 0
jne 0x1003c8b3
mov eax, dword [esi + 0x4010]
mov ecx, dword [esi + 0x4014]
mov edx, eax
or edx, ecx
mov edi, 2
mov dword [esi + 0x4004], edi
je 0x1003c840
push ecx
push eax
push str.Ignore__I64d_bytes_of_response_body_n
push ebp
call fcn.10013910
add esp, 0x10
jmp 0x1003c8c2
cmp dword [esi + 0x401c], 0
je 0x1003c8b8
push str.Ignore_chunked_response_body_n
push ebp
call fcn.10013910
mov dword [ebp + 0x594], 1
mov eax, dword [esi + 0x4008]
add eax, 1
add esp, 8
cmp byte [eax], 0xa
jne 0x1003c875
mov dword [esi + 0x4008], eax
mov edx, dword [esi + 0x4008]
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x28]
push ecx
push 1
add edx, 1
push edx
push eax
call fcn.10040ea0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1003c8c2
push str.chunk_reading_DONE_n
push ebp
call fcn.10013910
add esp, 8
mov dword [esi + 0x4018], edi
jmp 0x1003c8b8
mov edi, 2
mov dword [esi + 0x4004], 0
mov ecx, dword [esi + 0x4010]
or ecx, dword [esi + 0x4014]
jne 0x1003c8d6
mov dword [esi + 0x4018], edi
cmp dword [esi + 0x4004], 0
jne 0x1003c350
jmp 0x1003c406
cmp dword [ebp + 0x5d8], 0
je 0x1003c91b
cmp dword [ebp + 0xe48], 0
je 0x1003c91b
mov edx, dword [esp + 0x3c]
push str.Proxy_CONNECT_connection_closed_n
push ebp
mov dword [edx + 0x32c], 1
call fcn.10013910
add esp, 8
jmp 0x1003c3fc
push str.Proxy_CONNECT_aborted
push ebp
mov dword [esp + 0x28], 1
call fcn.10013a00
add esp, 8
jmp 0x1003c3fc
lea ecx, [esp + 0x10]
push ecx
call fcn.10032c60
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x28
ret
lea edx, [esp + 0x10]
push edx
call fcn.10032c60
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x28
ret
push ebx
call dword [0x10072004]
lea eax, [esp + 0x14]
push eax
call fcn.10032c60
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x28
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebp
call fcn.10013a00
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1c
pop ebx
add esp, 0x28
ret
push str.CONNECT_response_too_large_
push ebp
call fcn.10013a00
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x28
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x28
ret
mov ebx, dword [esp + 0x40]
mov ecx, dword [edi + ebx*4 + 0x1c0]
push ecx
push edi
call fcn.10018e20
add esp, 8
mov dword [edi + ebx*4 + 0x1c0], 0xffffffff
jmp 0x1003c9fe
mov ebx, dword [esp + 0x40]
mov ecx, dword [ebp + 0x1164]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
je 0x1003cac1
cmp dword [esi + 0x4020], 0
je 0x1003ca51
cmp dword [ebp + 0x140], 0
je 0x1003ca51
push str.Connect_me_again_please_n
push ebp
mov dword [edi + 0x32c], 1
call fcn.10013910
add esp, 8
mov eax, edi
call fcn.1003c010
jmp 0x1003ca8c
mov ecx, dword [ebp + 0x140]
push ecx
call dword [0x10072004]
push 2
push edi
mov dword [ebp + 0x140], 0
call fcn.10018fc0
mov edx, dword [edi + ebx*4 + 0x1c0]
push edx
push edi
call fcn.10018e20
add esp, 0x14
mov dword [edi + ebx*4 + 0x1c0], 0xffffffff
mov dword [esi + 0x4018], 0
cmp dword [edi + 0x32c], 0
jne 0x1003cb11
mov eax, dword [ebp + 0x100]
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebp
call fcn.10013a00
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x28
ret
mov dword [esi + 0x4018], 2
mov ecx, dword [edi + 0x39c]
push ecx
call dword [0x10072004]
xor esi, esi
mov dword [edi + 0x39c], esi
mov edx, dword [ebp + 0x1164]
push edx
push str.Proxy_replied__d_to_CONNECT_request_n
push ebp
mov dword [ebp + 0xe4c], 1
mov dword [ebp + 0xe50], esi
call fcn.10013910
mov dword [ebp + 0x594], esi
add esp, 0x10
mov dword [edi + 0x310], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret