Function at 0x40a130
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
mov esi, dword [esp + 0x14]
movsx eax, byte [esi + 0x12d]
shl eax, 6
mov ebp, dword [eax + ebx + 0x4c]
push edi
lea edi, [eax + ebx + 0x1c]
movsx eax, byte [esi + 0x126]
add eax, 0xfffffff8
cmp eax, 5
ja case.default.0x40a15d
jmp dword [eax*4 + 0x40a5b0]
push esi
call fcn.0040b530
add esp, 4
neg eax
pop edi
sbb eax, eax
pop esi
neg eax
pop ebp
dec eax
pop ebx
ret
mov eax, dword [esp + 0x1c]
test byte [eax + 6], 0x20
je 0x40a1a5
mov ecx, dword [eax]
push ecx
push esi
push str.Proxy_connection__p__fd_d__dead_n
push 2
call fcn.00403280
push 0
push esi
call fcn.00403570
add esp, 0x18
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov edx, dword [esi + 0x104]
push 0
push 0x1000
push ebp
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x40a1e9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je case.default.0x40a15d
push 0
push esi
call fcn.00403570
push str.ERROR_reading_from_proxy_socket_n
push 1
call fcn.00403280
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [edi + 0x30]
mov byte [eax + 0xd], 0
mov ecx, str.HTTP_1.0_200
mov eax, ebp
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40a217
test dl, dl
je 0x40a213
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40a217
add eax, 2
add ecx, 2
test dl, dl
jne 0x40a1f7
xor eax, eax
jmp 0x40a21c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40a26f
mov ecx, str.HTTP_1.1_200
mov eax, ebp
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40a247
test dl, dl
je 0x40a243
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40a247
add eax, 2
add ecx, 2
test dl, dl
jne 0x40a227
xor eax, eax
jmp 0x40a24c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40a26f
push 0
push esi
call fcn.00403570
push ebp
push str.ERROR_proxy:__s_n
push 1
call fcn.00403280
add esp, 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push 0
push 0
push esi
call fcn.00402f60
add esp, 0xc
push 0
push 2
push esi
call fcn.00403f50
add esp, 0xc
test eax, eax
jne 0x40a5a7
test byte [esi + 0x120], 0xc0
je 0x40a398
cmp dword [esi + 0xf4], eax
jne 0x40a330
push 0x52
push esi
call fcn.00407290
mov ecx, dword [ebx + 0x170]
push ecx
mov edi, eax
call fcn.0040e560
push 0
push 2
push 0x21
push eax
mov dword [esi + 0xf4], eax
call fcn.0040eb20
mov edx, dword [esi + 0xf4]
push edi
push 0
push 0x37
push edx
call fcn.0040eb20
mov eax, dword [esi + 0x104]
push 0
push eax
call fcn.00435120
mov ecx, dword [esi + 0xf4]
push eax
push eax
push ecx
mov dword [esi + 0xf8], eax
call fcn.0040ce20
mov edx, dword [esi + 0xf8]
add esp, 0x40
push 0
push 1
push 0x66
push edx
call fcn.00434e10
mov eax, dword [0x6bef88]
mov ecx, dword [esi + 0xf4]
push ebx
push eax
push ecx
call fcn.0040e370
add esp, 0x1c
test byte [esi + 0x120], 0xc0
je 0x40a398
mov edx, dword [esi + 0xf4]
push edx
call fcn.0040f310
add esp, 4
test eax, eax
jge 0x40a36c
push eax
mov eax, dword [esi + 0xf4]
push eax
call fcn.0040f0c0
add esp, 8
cmp eax, 2
je 0x40a3ee
cmp eax, 3
jne 0x40a36e
jmp 0x40a3e5
jg case.0x40a15d.12
call fcn.00433cd0
mov edi, eax
test edi, edi
je case.0x40a15d.12
push ebp
push edi
call fcn.00433c80
push eax
push edi
push str.SSL_connect_error__lu:__s_n
push 1
call fcn.00403280
add esp, 0x18
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov dword [esi + 0xf4], 0
test byte [esi + 0x120], 0xc0
je 0x40a472
cmp byte [esi + 0x126], 0xc
jne 0x40a40d
mov ecx, dword [esi + 0xf4]
push ecx
call fcn.0040f310
add esp, 4
test eax, eax
jge 0x40a3fc
mov edx, dword [esi + 0xf4]
push eax
push edx
call fcn.0040f0c0
add esp, 8
cmp eax, 2
je 0x40a3ee
cmp eax, 3
jne 0x40a3fe
push esi
call fcn.00404010
add esp, 4
pop edi
mov byte [esi + 0x126], 0xc
pop esi
pop ebp
xor eax, eax
pop ebx
ret
jg 0x40a40d
call fcn.00433cd0
mov edi, eax
test edi, edi
jne 0x40a379
mov eax, dword [esi + 0xf4]
push eax
call fcn.0040e330
mov edi, eax
add esp, 4
test edi, edi
je 0x40a47c
cmp edi, 0x12
je 0x40a42c
cmp edi, 0x13
jne 0x40a44b
mov ecx, dword [esi + 0x120]
and cl, 0xc0
cmp cl, 0x80
jne 0x40a44b
push str.accepting_self_signed_certificate_n
push 4
call fcn.00403280
add esp, 8
jmp 0x40a47c
push ebp
push edi
call fcn.00433c80
push eax
push edi
push str.servers_cert_didnt_look_good__X509_V_ERR___d:__s_n
push 1
call fcn.00403280
push 0
push esi
call fcn.00403570
add esp, 0x20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov dword [esi + 0xf4], 0
mov byte [esi + 0x126], 0xb
mov edx, dword [ebx + 0x31c]
push edx
push 0xb
push esi
call fcn.00402f60
add esp, 0xc
push ebp
push esi
call fcn.00409e50
add esp, 8
test eax, eax
jne 0x40a4c1
push str.Failed_to_generate_handshake_for_client_n
push 1
call fcn.00403280
push 0
push esi
call fcn.00403570
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov ecx, ebp
sub eax, ecx
push eax
push ecx
push esi
call fcn.004065b0
add esp, 0xc
cmp eax, 0xfffffffe
je 0x40a4ec
cmp eax, 0xffffffff
jne 0x40a4f5
push 0
push esi
call fcn.00403570
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push esi
call fcn.00404010
add esp, 4
xor eax, eax
mov byte [esi + 0x16], 0x55
mov word [esi + 0x10], ax
mov byte [esi + 0x126], 0xd
mov ecx, dword [ebx + 0x31c]
push ecx
push 4
push esi
call fcn.00402f60
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov edx, dword [esp + 0x1c]
movzx eax, word [edx + 6]
test al, 0x20
jne 0x40a59c
test al, 9
je case.default.0x40a15d
mov bl, 0x58
cmp byte [esi + 0x16], bl
je 0x40a57f
lea ebx, [ebx]
push 1
lea eax, [esp + 0x18]
push eax
push esi
call fcn.004064a0
add esp, 0xc
cmp eax, 0xfffffffe
je case.default.0x40a15d
jle 0x40a55f
test eax, eax
jle 0x40a59c
mov ecx, dword [esp + 0x14]
push ecx
push esi
call fcn.00407550
add esp, 8
test eax, eax
jne 0x40a58d
cmp byte [esi + 0x16], bl
jne 0x40a540
cmp byte [esi + 0x16], bl
jne case.default.0x40a15d
push esi
call fcn.00409510
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
ret
push str.problems_parsing_header_n
push 2
call fcn.00403280
add esp, 8
push 0
push esi
call fcn.00403570
add esp, 8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret