Function at 0x4a5850
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1d0
mov eax, dword [esp + 0x1d8]
push ebx
push ebp
mov ebp, dword [esp + 0x1dc]
mov ebx, dword [ebp]
push esi
add eax, eax
push edi
lea edi, [ebp + eax*8 + 0x468]
xor eax, eax
or ecx, 0xffffffff
mov esi, 2
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x50], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], eax
cmp dword [ebp + 0x358], esi
jne 0x4a58bc
xor edx, edx
cmp dword [ebp + 0x424], ecx
setne dl
add edx, edx
cmp dword [ebp + edx*8 + 0x488], esi
je 0x4a58bc
mov eax, dword [ebp + 0x34c]
mov dword [esp + 0x40], eax
jmp 0x4a58c6
mov ecx, dword [ebp + 0x304]
mov dword [esp + 0x40], ecx
push 1
push esi
push 1
push 5
call fcn.004a48b0
add esp, 0x10
test eax, eax
je 0x4a58e7
push str.schannel:_Windows_version_is_old_and_may_not_be_able_to_connect_to_some_servers_due_to_lack_of_SNI__algorithms__etc._n
push ebx
call fcn.004996c0
add esp, 8
mov edx, dword [edi + 8]
xor ecx, ecx
mov dword [edx + 0x4c], ecx
cmp dword [ebp + 0x358], esi
jne 0x4a5916
xor eax, eax
cmp dword [ebp + 0x424], 0xffffffff
setne al
add eax, eax
cmp dword [ebp + eax*8 + 0x488], esi
je 0x4a5916
mov eax, dword [ebp + 0x4f8]
jmp 0x4a591c
mov eax, dword [ebp + 0x4b8]
cmp eax, ecx
je 0x4a595d
push 3
push esi
push 1
push 6
call fcn.004a48b0
add esp, 0x10
test eax, eax
je 0x4a593f
mov ecx, dword [edi + 8]
mov dword [ecx + 0x50], 1
jmp 0x4a5963
push str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
push ebx
call fcn.00499790
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x4d
pop ebx
add esp, 0x1d0
ret
mov edx, dword [edi + 8]
mov dword [edx + 0x50], ecx
mov eax, dword [edi + 8]
mov dword [eax], 0
cmp dword [ebp + 0x358], esi
jne 0x4a5993
xor ecx, ecx
cmp dword [ebp + 0x424], 0xffffffff
setne cl
add ecx, ecx
cmp dword [ebp + ecx*8 + 0x488], esi
je 0x4a5993
mov eax, dword [ebx + 0x924]
jmp 0x4a5999
mov eax, dword [ebx + 0x89c]
test eax, eax
je 0x4a59d9
push ebp
call fcn.00490750
mov edx, dword [esp + 0x1ec]
push edx
push 0
lea eax, [esp + 0x48]
push eax
push ebp
call fcn.004907b0
add esp, 0x14
test eax, eax
jne 0x4a59d0
mov ecx, dword [edi + 8]
mov edx, dword [esp + 0x3c]
mov dword [ecx], edx
mov eax, dword [edi + 8]
mov eax, dword [eax]
inc dword [eax + 0x10]
push ebp
call fcn.00490780
add esp, 4
mov esi, dword [edi + 8]
cmp dword [esi], 0
jne 0x4a609c
push 0x38
lea ecx, [esp + 0x84]
push 0
push ecx
call fcn.004d8c50
add esp, 0xc
cmp dword [ebp + 0x4dc], 0
mov dword [esp + 0x80], 4
mov ecx, ebx
je 0x4a5a4a
mov eax, dword [esi + 0x50]
neg eax
sbb eax, eax
and eax, 0xffffffe8
add eax, 0x20
mov dword [esp + 0xb0], eax
cmp dword [ecx + 0x8d8], 0
je 0x4a5a33
or eax, 0x1800
jmp 0x4a5a4f
cmp dword [ecx + 0x8e0], 0
je 0x4a5a43
or eax, 0x1a00
jmp 0x4a5a4f
or eax, 0x200
jmp 0x4a5a4f
mov eax, 0x1808
cmp dword [ebp + 0x4e0], 0
mov dword [esp + 0xb0], eax
jne 0x4a5a69
or eax, 4
mov dword [esp + 0xb0], eax
mov eax, dword [ebp + 0x4ac]
cmp eax, 7
ja case.default.0x4a5a78
jmp dword [eax*4 + 0x4a6310]
mov eax, ebp
lea esi, [esp + 0x80]
call fcn.004a49f0
test eax, eax
je 0x4a5ab4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov dword [esp + 0xa0], 0x20
jmp 0x4a5ab4
mov dword [esp + 0xa0], 8
mov ecx, dword [ebp + 0x358]
cmp ecx, 2
jne 0x4a5ade
xor edx, edx
cmp dword [ebp + 0x424], 0xffffffff
setne dl
add edx, edx
cmp dword [ebp + edx*8 + 0x488], ecx
je 0x4a5ade
mov eax, dword [ebp + 0x508]
jmp 0x4a5ae4
mov eax, dword [ebp + 0x4c8]
test eax, eax
je 0x4a5b43
cmp ecx, 2
jne 0x4a5b0c
xor eax, eax
cmp dword [ebp + 0x424], 0xffffffff
setne al
add eax, eax
cmp dword [ebp + eax*8 + 0x488], ecx
je 0x4a5b0c
mov eax, dword [ebp + 0x508]
jmp 0x4a5b12
mov eax, dword [ebp + 0x4c8]
lea ebx, [esp + 0x80]
call fcn.004a5660
mov esi, eax
test esi, esi
je 0x4a5b43
mov ecx, dword [esp + 0x10]
push str.Unable_to_set_ciphers_to_passed_via_SSL_CONN_CONFIG
push ecx
call fcn.00499790
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx + 0x870]
xor esi, esi
cmp eax, esi
jne 0x4a5b5f
cmp dword [ebx + 0x888], esi
je 0x4a5f9a
xor ecx, ecx
xor edi, edi
cmp dword [ebx + 0x888], esi
mov dword [esp + 0x30], esi
setne cl
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ecx
cmp ecx, esi
je 0x4a5ba1
mov eax, dword [ebx + 0x888]
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], eax
jmp 0x4a5c0f
cmp eax, esi
je 0x4a5fd1
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x38]
push ecx
call fcn.004a56d0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4a5c82
mov eax, dword [ebx + 0x870]
cmp byte [eax], 0
je 0x4a5be9
push 0x50dd10
push eax
call fcn.004a94d0
mov edi, eax
add esp, 8
test edi, edi
jne 0x4a5c0b
mov edx, dword [ebx + 0x870]
push edx
push str.schannel:_Failed_to_get_certificate_location_or_file_for__s
push ebx
call fcn.00499790
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov esi, dword [esp + 0x14]
mov eax, dword [ebx + 0x8b8]
test eax, eax
je 0x4a5c5b
push 0x51ad44
push eax
call fcn.004a2240
add esp, 8
test eax, eax
jne 0x4a5c5b
cmp dword [esp + 0x20], eax
mov eax, str._memory_blob_
jne 0x4a5c3c
mov eax, dword [ebx + 0x870]
push eax
push str.schannel:_certificate_format_compatibility_error__for__s
push ebx
call fcn.00499790
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x3a
pop ebx
add esp, 0x1d0
ret
test edi, edi
jne 0x4a5c65
cmp dword [esp + 0x20], edi
je 0x4a5c86
xor ebp, ebp
mov dword [esp + 0x28], ebp
cmp dword [esp + 0x20], ebp
je 0x4a5d49
mov dword [esp + 0x14], str._memory_blob_
jmp 0x4a5d55
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
push esi
or eax, 0x4000
push eax
push 0
push 0
push 9
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov edi, eax
test edi, edi
jne 0x4a5cd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x30]
push eax
push esi
push ecx
push str.schannel:_Failed_to_open_cert_store__x__s__last_error_is_0x_x
push ebx
call fcn.00499790
push esi
call dword [0x54ae6c]
add esp, 0x18
lea eax, [edi + 0x3a]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
push esi
call dword [0x54ae6c]
add esp, 4
push 0
push 0
lea edx, [esp + 0xc4]
lea eax, [esp + 0x5c]
push eax
mov ecx, edx
push ecx
push 4
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x3c]
push 0x28
push edx
mov dword [esp + 0x70], 0x14
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
push 0
test eax, eax
je 0x4a5f51
lea eax, [esp + 0x58]
push eax
push 0x10000
push 0
push 0x10001
push edi
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4a5f4f
lea ecx, [esp + 0x1c]
mov dword [esp + 0x88], ecx
jmp 0x4a5f7e
mov edx, ebx
mov eax, dword [edx + 0x870]
mov dword [esp + 0x14], eax
cmp edi, ebp
je 0x4a5e15
push 2
xor ebx, ebx
push ebx
push edi
call fcn.004dbd04
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a5d87
push edi
call fcn.004dc6ee
mov ebx, eax
add esp, 4
test ebx, ebx
jns 0x4a5d87
xor esi, esi
jmp 0x4a5db4
mov dword [esp + 0x24], ebx
test esi, esi
je 0x4a5db4
push 0
push 0
push edi
call fcn.004dbd04
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a5db4
inc ebx
push ebx
call dword [0x54ae68]
add esp, 4
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], ebp
je 0x4a5dd4
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
push edi
push 1
push ecx
push edx
call fcn.004dbc5d
add esp, 0x10
cmp eax, 1
je 0x4a5dd6
xor esi, esi
push edi
call fcn.004d7a5a
add esp, 4
test esi, esi
jne 0x4a5e15
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x870]
push ecx
push str.schannel:_Failed_to_read_cert_file__s
push eax
call fcn.00499790
mov edx, dword [esp + 0x24]
push edx
call dword [0x54ae6c]
add esp, 0x10
pop edi
lea eax, [esi + 0x3a]
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x8c8]
mov dword [esp + 0x30], ecx
test eax, eax
je 0x4a5e41
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a5e36
sub eax, edx
mov ebp, eax
lea edx, [ebp + ebp + 2]
push edx
call dword [0x54ae68]
mov esi, eax
add esp, 4
test esi, esi
je 0x4a5eac
test ebp, ebp
je 0x4a5e9c
mov ecx, dword [ebx + 0x8c8]
lea eax, [ebp + 1]
push eax
push esi
push ebp
push ecx
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jns 0x4a5ea0
xor eax, eax
mov word [esi], ax
push 0
push esi
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.CRYPT32.dll_PFXImportCertStore]
mov edi, eax
push esi
mov dword [esp + 0x30], edi
call dword [0x54ae6c]
add esp, 4
jmp 0x4a5eb0
mov eax, dword [esp + 0x28]
cmp eax, ebp
jg 0x4a5e77
xor edx, edx
mov word [esi + eax*2], dx
jmp 0x4a5e7c
mov edi, dword [esp + 0x2c]
cmp dword [esp + 0x20], 0
jne 0x4a5ec5
mov edx, dword [esp + 0x18]
push edx
call dword [0x54ae6c]
add esp, 4
test edi, edi
jne 0x4a5f19
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x56
jne 0x4a5ef5
mov eax, dword [esp + 0x14]
push eax
push str.schannel:_Failed_to_import_cert_file__s__password_is_bad
push ebx
call fcn.00499790
add esp, 0xc
lea eax, [edi + 0x3a]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov ecx, dword [esp + 0x14]
push eax
push ecx
push str.schannel:_Failed_to_import_cert_file__s__last_error_is_0x_x
push ebx
call fcn.00499790
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x3a
pop ebx
add esp, 0x1d0
ret
push 0
push 0
push 0
push 0
push 0x10001
push edi
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4a5f68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x14]
push eax
push edx
push str.schannel:_Failed_to_get_certificate_from_file__s__last_error_is_0x_x
push ebx
call fcn.00499790
add esp, 0x10
push 0
push edi
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
pop edi
pop esi
pop ebp
mov eax, 0x3a
pop ebx
add esp, 0x1d0
ret
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x1e4]
lea eax, [esp + 0x1c]
mov dword [esp + 0x88], eax
push 0
push edi
mov dword [esp + 0x8c], 1
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov edi, dword [esp + 0x50]
mov ebx, dword [esp + 0x10]
push 0x18
push 1
call dword [0x54ae78]
mov ecx, dword [edi + 8]
mov dword [ecx], eax
mov eax, dword [edi + 8]
add esp, 8
cmp dword [eax], 0
jne 0x4a5fe1
push str.schannel:_unable_to_allocate_memory
push ebx
call fcn.00499790
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
je 0x4a5fd1
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x1d0
ret
mov edx, dword [eax]
mov dword [edx + 0x10], 1
mov eax, dword [edi + 8]
mov eax, dword [eax]
lea ecx, [eax + 8]
push ecx
push eax
mov eax, dword [0x54ee60]
mov ecx, dword [eax + 0xc]
push 0
push 0
lea edx, [esp + 0x90]
push edx
push 0
push 2
push str.Microsoft_Unified_Security_Protocol_Provider
push 0
call ecx
mov esi, eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a6026
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test esi, esi
je 0x4a609c
push 0x100
lea edx, [esp + 0xe4]
push edx
push esi
call fcn.0048efa0
push eax
push str.schannel:_AcquireCredentialsHandle_failed:__s
push ebx
call fcn.00499790
mov eax, dword [edi + 8]
mov ecx, dword [eax]
push ecx
call dword [0x54ae6c]
mov edx, dword [edi + 8]
add esp, 0x1c
xor eax, eax
cmp esi, 0x80090300
setne al
pop edi
pop esi
pop ebp
mov dword [edx], 0
pop ebx
lea eax, [eax*8 + 0x1b]
add esp, 0x1d0
ret
push str.Unrecognized_parameter_passed_via_CURLOPT_SSLVERSION
push ecx
call fcn.00499790
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x23
pop ebx
add esp, 0x1d0
ret
mov esi, dword [esp + 0x40]
lea eax, [esp + 0xb8]
push eax
push esi
push 2
call fcn.004c80d0
add esp, 0xc
test eax, eax
jne 0x4a60ce
lea ecx, [esp + 0xd0]
push ecx
push esi
push 0x17
call fcn.004c80d0
add esp, 0xc
test eax, eax
je 0x4a60e0
mov edx, dword [esp + 0x10]
push str.schannel:_using_IP_address__SNI_is_not_supported_by_OS._n
push edx
call fcn.004996c0
add esp, 8
mov edx, dword [edi + 8]
xor ebx, ebx
lea eax, [esp + 0x5c]
mov dword [esp + 0x70], eax
mov eax, 1
lea ecx, [esp + 0x44]
push 0x10
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x7c], eax
push eax
mov dword [edx + 0x38], 0x811c
call dword [0x54ae78]
mov ecx, dword [edi + 8]
mov dword [ecx + 4], eax
mov eax, dword [edi + 8]
add esp, 8
cmp dword [eax + 4], ebx
jne 0x4a6166
mov edx, dword [esp + 0x10]
push str.schannel:_unable_to_allocate_memory
push edx
call fcn.00499790
add esp, 8
pop edi
pop esi
pop ebp
lea eax, [ebx + 0x1b]
pop ebx
add esp, 0x1d0
ret
cmp esi, ebx
je 0x4a5fd1
mov ecx, dword [eax + 4]
lea edx, [ecx + 8]
push edx
lea edx, [eax + 0x3c]
push edx
lea edx, [esp + 0x7c]
push edx
push ecx
mov ecx, dword [eax + 0x4c]
neg ecx
push ebx
sbb ecx, ecx
lea edx, [esp + 0x7c]
and ecx, edx
mov edx, dword [eax]
push ecx
mov ecx, dword [eax + 0x38]
mov eax, dword [0x54ee60]
push ebx
push ebx
push ecx
mov ecx, dword [eax + 0x18]
push esi
push ebx
push edx
call ecx
mov esi, eax
cmp esi, 0x90312
je 0x4a6277
mov edx, dword [edi + 8]
mov eax, dword [edx + 4]
push eax
call dword [0x54ae6c]
mov ecx, dword [edi + 8]
add esp, 4
mov dword [ecx + 4], ebx
push 0x100
cmp esi, 0x80090300
je 0x4a6242
cmp esi, 0x80090322
je 0x4a620d
lea edx, [esp + 0xe4]
push edx
push esi
call fcn.0048efa0
push eax
mov eax, dword [esp + 0x20]
push str.schannel:_initial_InitializeSecurityContext_failed:__s
push eax
call fcn.00499790
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x23
pop ebx
add esp, 0x1d0
ret
lea ecx, [esp + 0xe4]
push ecx
push 0x80090322
call fcn.0048efa0
mov edx, dword [esp + 0x1c]
push eax
push str.schannel:_SNI_or_certificate_check_failed:__s
push edx
call fcn.00499790
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x3c
pop ebx
add esp, 0x1d0
ret
lea eax, [esp + 0xe4]
push eax
push 0x80090300
call fcn.0048efa0
mov ecx, dword [esp + 0x1c]
push eax
push str.schannel:_initial_InitializeSecurityContext_failed:__s
push ecx
call fcn.00499790
add esp, 0x18
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x1d0
ret
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x1ec]
push eax
mov eax, dword [ebp + edx*4 + 0x420]
push ecx
push eax
push ebp
call fcn.00499d10
mov ecx, dword [esp + 0x60]
mov edx, dword [0x54ee60]
add esp, 0x14
mov esi, eax
mov eax, dword [edx + 0x40]
push ecx
call eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
cmp esi, ebx
jne 0x4a62ec
cmp ecx, eax
jne 0x4a62ec
mov ecx, dword [edi + 8]
mov dword [ecx + 0x40], ebx
mov edx, dword [edi + 8]
mov dword [edx + 0x44], ebx
mov eax, dword [edi + 8]
mov dword [eax + 0x48], ebx
mov ecx, dword [edi + 8]
mov dword [ecx + 0x34], ebx
mov dword [edi + 4], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1d0
ret
mov edx, dword [esp + 0x10]
push ecx
push eax
push str.schannel:_failed_to_send_initial_handshake_data:_sent__zd_of__lu_bytes
push edx
call fcn.00499790
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x23
pop ebx
add esp, 0x1d0
ret