Function at 0x513240
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x180
mov eax, dword [0x6d35ac]
xor eax, esp
mov dword [esp + 0x17c], eax
push ebx
mov ebx, dword [esp + 0x190]
lea eax, [esp + 0x34]
push ebp
push esi
mov esi, dword [esp + 0x194]
push edi
mov edi, dword [esp + 0x194]
lea ebx, [ebx + 0x19]
push 0x38
shl ebx, 4
push 0
add ebx, esi
mov dword [esp + 0x20], 0
push eax
mov dword [esp + 0x40], ebx
call fcn.005b24a0
add esp, 0xc
mov dword [esp + 0x40], 4
cmp byte [esi + 0x210], 0
mov ebp, 0x1b0
je 0x513331
mov eax, dword [ebx + 8]
mov edx, 8
mov ecx, 0x20
lea ebx, [ebp + 0x10]
cmp byte [eax + 0x47], 0
cmovne ecx, edx
mov edx, dword [esi + 0xb8]
cmp edx, 2
jne 0x5132e7
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, ebx
cmp dword [eax + esi], edx
je 0x5132e7
mov al, byte [edi + 0x4d3]
jmp 0x5132ed
mov al, byte [edi + 0x467]
test al, al
je 0x5132f9
or ecx, 0x1800
jmp 0x51333c
cmp edx, 2
jne 0x513317
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, ebx
cmp dword [eax + esi], edx
je 0x513317
mov al, byte [edi + 0x4d5]
jmp 0x51331d
mov al, byte [edi + 0x469]
test al, al
je 0x513329
or ecx, 0x1a00
jmp 0x51333c
or ecx, 0x200
jmp 0x51333c
mov edx, dword [esi + 0xb8]
mov ecx, 0x1808
cmp byte [esi + 0x211], 0
mov dword [esp + 0x70], ecx
jne 0x513350
or ecx, 4
mov dword [esp + 0x70], ecx
mov ebx, 0x1c0
cmp edx, 2
jne 0x513373
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, ebx
cmp dword [eax + esi], edx
je 0x513373
mov al, byte [edi + 0x4d7]
jmp 0x513379
mov al, byte [edi + 0x46b]
test al, al
jne 0x51338e
and ecx, 0xffffffbf
mov eax, str.schannel:_disabled_automatic_use_of_client_certificate
or ecx, 0x10
mov dword [esp + 0x70], ecx
jmp 0x513393
mov eax, str.schannel:_enabled_automatic_use_of_client_certificate
push eax
push edi
call fcn.004fd800
mov edx, dword [esi + 0x1d4]
add esp, 8
cmp edx, 7
ja case.default.0x5133b3
movzx eax, byte [edx + 0x513c18]
jmp dword [eax*4 + 0x513c10]
mov ecx, dword [esi + 0xb8]
cmp ecx, 2
jne 0x5133fd
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, ebx
cmp dword [eax + esi], ecx
je 0x5133de
mov edx, dword [esi + 0x214]
jmp 0x5133e3
cmp ecx, 2
jne 0x5133fd
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, ebx
cmp dword [eax + esi], 2
je 0x5133fd
mov ebx, dword [esi + 0x218]
jmp 0x513403
mov ebx, dword [esi + 0x1d8]
test ebx, ebx
je 0x51340f
cmp ebx, 0x10000
jne 0x513414
mov ebx, 0x60000
sar ebx, 0x10
cmp edx, ebx
jg 0x513456
mov ecx, dword [esp + 0x60]
add edx, 0xfffffffc
cmp edx, 3
ja case.default.0x513427
jmp dword [edx*4 + 0x513c20]
or ecx, 0x80
jmp 0x513444
or ecx, 0x200
jmp 0x513444
or ecx, 0x800
mov dword [esp + 0x60], ecx
inc edx
lea eax, [edx + 4]
cmp eax, ebx
jle 0x513422
mov ecx, dword [esi + 0xb8]
mov ebx, 0x1c0
cmp ecx, 2
jne 0x513491
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, ebx
cmp dword [eax + esi], ecx
je 0x513491
mov eax, dword [esi + 0x234]
jmp 0x513497
push str.schannel:_TLS_1.3_is_not_yet_supported
push edi
call fcn.004fd730
add esp, 8
mov eax, 0x23
jmp 0x513bf7
mov eax, dword [esi + 0x1f4]
test eax, eax
je 0x51354e
cmp ecx, 2
jne 0x5134bb
cmp dword [esi + 0x14c], 0xffffffff
cmovne ebp, ebx
cmp dword [esi + ebp], ecx
je 0x5134bb
mov esi, dword [esi + 0x234]
jmp 0x5134c1
mov esi, dword [esi + 0x1f4]
mov ebp, dword [esp + 0x34]
xor ebx, ebx
mov ebp, dword [ebp + 8]
add ebp, 0x48
test esi, esi
je 0x513546
cmp byte [esi], 0
je 0x513546
cmp ebx, 0x2d
jge 0x513546
push 0
push 0
push esi
call fcn.005c61b7
add esp, 0xc
test eax, eax
jne 0x51352b
push esi
call fcn.00512610
add esp, 4
test eax, eax
jne 0x51352b
push 0x11
push str.USE_STRONG_CRYPTO
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
je 0x513521
push 0x15
push str.SCH_USE_STRONG_CRYPTO
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x51359a
or dword [esp + 0x70], 0x400000
jmp 0x513530
mov dword [ebp + ebx*4], eax
inc ebx
push 0x3a
push esi
call fcn.005b31b0
mov esi, eax
add esp, 8
test esi, esi
je 0x513546
add esi, 1
jne 0x5134d1
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x58], ebx
mov eax, dword [edi + 0x414]
test eax, eax
jne 0x513564
cmp dword [edi + 0x42c], eax
je 0x513afb
mov ecx, dword [edi + 0x42c]
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x10], ebp
xor esi, esi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
test ecx, ecx
je 0x5135af
mov eax, dword [ecx]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x20], eax
jmp 0x51376c
push str.Unable_to_set_ciphers_to_passed_via_SSL_CONN_CONFIG
push edi
call fcn.004fd730
mov eax, 0x3b
jmp 0x513bf4
push eax
call fcn.005cd527
mov esi, eax
add esp, 4
test esi, esi
je 0x513b37
push 0x5c
push esi
call fcn.005b31b0
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x51370f
mov ebx, eax
sub ebx, esi
push ebx
push str.CurrentUser
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x5135fa
mov ebp, 0x10000
jmp 0x5136b4
push ebx
push str.LocalMachine
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x513617
mov ebp, 0x20000
jmp 0x5136b4
push ebx
push str.CurrentService
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x513634
mov ebp, 0x40000
jmp 0x5136b4
push ebx
push str.Services
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x51364e
mov ebp, 0x50000
jmp 0x5136b4
push ebx
push str.Users
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x513668
mov ebp, 0x60000
jmp 0x5136b4
push ebx
push str.CurrentUserGroupPolicy
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x513682
mov ebp, 0x70000
jmp 0x5136b4
push ebx
push str.LocalMachineGroupPolicy
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x51369c
mov ebp, 0x80000
jmp 0x5136b4
push ebx
push str.LocalMachineEnterprise
push esi
call fcn.005c6a30
add esp, 0xc
test eax, eax
jne 0x51370f
mov ebp, 0x90000
mov eax, dword [esp + 0x20]
inc eax
push 0x5c
push eax
mov dword [esp + 0x28], eax
call fcn.005b31b0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x51370f
lea eax, [ebx + 1]
mov ecx, eax
mov dword [esp + 0x2c], eax
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5136e0
sub ecx, edx
cmp ecx, 0x28
jne 0x51370f
push dword [esp + 0x20]
mov byte [ebx], al
call dword [0x6d300c]
mov edx, eax
mov byte [ebx], 0x5c
add esp, 4
mov dword [esp + 0x10], edx
test edx, edx
jne 0x513758
lea ebx, [eax + 0x1b]
jmp 0x513714
mov ebx, 0x3a
mov eax, dword [edi + 0x414]
cmp byte [eax], 0
je 0x513737
push 0x636a80
push eax
call fcn.00510b50
mov ecx, eax
add esp, 8
mov dword [esp + 0x1c], ecx
test ecx, ecx
jne 0x51375a
push dword [edi + 0x414]
push str.schannel:_Failed_to_get_certificate_location_or_file_for__s
push edi
call fcn.004fd730
push esi
call fcn.005c13b1
add esp, 0x10
mov eax, ebx
jmp 0x513bf7
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x5139f0
mov ebx, dword [esp + 0x1c]
mov eax, dword [edi + 0x450]
test eax, eax
je 0x5137ad
push 0x604f8c
push eax
call fcn.00501b50
add esp, 8
test eax, eax
jne 0x5137ad
cmp dword [esp + 0x28], eax
mov eax, str._memory_blob_
jne 0x513799
mov eax, dword [edi + 0x414]
push eax
push str.schannel:_certificate_format_compatibility_error__for__s
push edi
call fcn.004fd730
add esp, 0xc
jmp 0x513a30
mov eax, dword [esp + 0x28]
test ebx, ebx
jne 0x5137bd
test eax, eax
je 0x5139f0
xor ebx, ebx
test eax, eax
je 0x5137cd
mov dword [esp + 0x10], str._memory_blob_
jmp 0x5137d7
mov eax, dword [edi + 0x414]
mov dword [esp + 0x10], eax
test esi, esi
je 0x5137e4
push esi
call fcn.005c13b1
add esp, 4
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x5138b9
push 2
push 0
push esi
call fcn.005c3a4b
add esp, 0xc
test eax, eax
sete cl
mov byte [esp + 0x17], cl
test eax, eax
jne 0x51381b
push esi
call fcn.005c4044
mov cl, byte [esp + 0x1b]
add esp, 4
mov edx, eax
jmp 0x51381d
xor edx, edx
mov ebp, dword [esp + 0x20]
xor eax, eax
test edx, edx
movzx ecx, cl
cmovns eax, ecx
cmovns ebp, edx
mov dword [esp + 0x1c], eax
test al, al
je 0x513863
push 0
push 0
push esi
call fcn.005c3a4b
add esp, 0xc
test eax, eax
sete al
mov dword [esp + 0x1c], eax
test al, al
je 0x513863
lea eax, [ebp + 1]
push eax
call dword [section..data]
add esp, 4
mov dword [esp + 0x24], eax
jmp 0x513867
mov eax, dword [esp + 0x24]
test eax, eax
je 0x51387d
push esi
push 1
push ebp
push eax
call fcn.005c421b
add esp, 0x10
cmp eax, 1
je 0x513881
mov byte [esp + 0x1c], bl
push esi
call fcn.005c2c80
add esp, 4
cmp byte [esp + 0x1c], bl
jne 0x5138bd
push dword [edi + 0x414]
push str.schannel:_Failed_to_read_cert_file__s
push edi
call fcn.004fd730
mov eax, dword [esp + 0x30]
push eax
call dword [0x6d3004]
add esp, 0x10
mov eax, 0x3a
jmp 0x513bf7
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x460]
mov dword [esp + 0x2c], ebp
test eax, eax
je 0x5138e1
mov ebx, eax
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x5138d8
sub ebx, ecx
lea eax, [ebx*2 + 2]
push eax
call dword [section..data]
mov esi, eax
add esp, 4
test esi, esi
je 0x513948
test ebx, ebx
je 0x51393a
lea ecx, [ebx + 1]
push ecx
push esi
push ebx
push dword [edi + 0x460]
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jns 0x51393c
xor eax, eax
mov word [esi], ax
push 0
push esi
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.CRYPT32.dll_PFXImportCertStore]
push esi
mov ebx, eax
call dword [0x6d3004]
add esp, 4
jmp 0x51394a
xor eax, eax
cmp eax, ebx
jg 0x513919
xor ecx, ecx
mov word [esi + eax*2], cx
jmp 0x51391e
xor ebx, ebx
cmp dword [esp + 0x28], 0
jne 0x51395e
push dword [esp + 0x24]
call dword [0x6d3004]
add esp, 4
test ebx, ebx
jne 0x5139a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x56
jne 0x513987
push dword [esp + 0x10]
push str.schannel:_Failed_to_import_cert_file__s__password_is_bad
push edi
call fcn.004fd730
add esp, 0xc
lea eax, [ebx + 0x3a]
jmp 0x513bf7
push eax
push dword [esp + 0x14]
push str.schannel:_Failed_to_import_cert_file__s__last_error_is_0x_x
push edi
call fcn.004fd730
add esp, 0x10
mov eax, 0x3a
jmp 0x513bf7
push 0
push 0
push 0
push 0
push 0x10001
push ebx
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x513ae2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esp + 0x14]
push str.schannel:_Failed_to_get_certificate_from_file__s__last_error_is_0x_x
push edi
call fcn.004fd730
add esp, 0x10
push 0
push ebx
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, 0x3a
jmp 0x513bf7
push dword [esp + 0x10]
mov eax, ebp
or eax, 0x4000
push eax
push 0
push 0
push 9
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov ebx, eax
test ebx, ebx
jne 0x513a47
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x10]
push eax
push ebx
push ebp
push str.schannel:_Failed_to_open_cert_store__x__s__last_error_is_0x_x
push edi
call fcn.004fd730
push ebx
call dword [0x6d3004]
add esp, 0x18
test esi, esi
je 0x513a3d
push esi
call fcn.005c13b1
add esp, 4
mov eax, 0x3a
jmp 0x513bf7
push dword [esp + 0x10]
call dword [0x6d3004]
add esp, 4
mov dword [esp + 0x38], 0x14
lea eax, [esp + 0x78]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
push 0
push 0
push eax
lea eax, [esp + 0x84]
push eax
push 4
push 0x28
push dword [esp + 0x44]
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x513aab
test esi, esi
je 0x5139dd
push esi
call fcn.005c13b1
add esp, 4
push 0
push ebx
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, 0x3a
jmp 0x513bf7
push 0
lea eax, [esp + 0x3c]
push eax
push 0x10000
push 0
push 0x10001
push ebx
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [esp + 0x18], eax
test esi, esi
je 0x513ada
push esi
call fcn.005c13b1
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x5139dd
push 0
lea eax, [esp + 0x1c]
mov dword [esp + 0x48], 1
push ebx
mov dword [esp + 0x50], eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
push 0x18
push 1
call dword [0x6d3010]
mov ebx, dword [esp + 0x3c]
add esp, 8
mov ecx, dword [ebx + 8]
mov dword [ecx], eax
mov eax, dword [ebx + 8]
mov eax, dword [eax]
test eax, eax
jne 0x513b41
push str.schannel:_unable_to_allocate_memory
push edi
call fcn.004fd730
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x513b37
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov eax, 0x1b
jmp 0x513bf7
mov dword [eax + 0x10], 1
mov eax, dword [ebx + 8]
mov ecx, dword [eax]
lea eax, [ecx + 8]
push eax
push ecx
push 0
push 0
lea eax, [esp + 0x50]
push eax
mov eax, dword [0x6d9624]
push 0
push 2
push str.Microsoft_Unified_Security_Protocol_Provider
mov eax, dword [eax + 0xc]
push 0
call eax
mov ecx, dword [esp + 0x18]
mov esi, eax
test ecx, ecx
je 0x513b81
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test esi, esi
je 0x513bce
push 0x100
lea eax, [esp + 0x90]
push eax
push esi
call fcn.0050fba0
push eax
push str.schannel:_AcquireCredentialsHandle_failed:__s
push edi
call fcn.004fd730
mov eax, dword [ebx + 8]
push dword [eax]
call dword [0x6d3004]
mov eax, dword [ebx + 8]
add esp, 0x1c
mov dword [eax], 0
cmp esi, 0x80090300
je 0x513b37
mov eax, 0x23
jmp 0x513bf7
xor eax, eax
jmp 0x513bf7
push str.SSL_versions_not_supported
push edi
call fcn.004fd730
mov eax, 4
jmp 0x513bf4
push str.Unrecognized_parameter_passed_via_CURLOPT_SSLVERSION
push edi
call fcn.004fd730
mov eax, 0x23
add esp, 8
mov ecx, dword [esp + 0x18c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059a7a2
add esp, 0x180
ret