Function at 0x452bc0
Capabilities:
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x12c
mov esi, dword [esp + 0x140]
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
cmp dword [esi + 0xf0], 2
mov ebx, dword [esi]
je 0x452df0
mov eax, dword [esi + 0x9c]
mov dword [esp + 0x34], eax
mov edi, dword [esp + 0x144]
lea eax, [esp + 0x54]
mov dword [esp + 4], 0x53
mov dword [esp + 8], eax
shl edi, 4
add edi, esi
mov eax, dword [edi + 0x1ec]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [0x62f460]
call dword [eax + 0x2c]
sub esp, 0xc
test eax, eax
jne 0x452da0
mov edx, dword [esp + 0x54]
test edx, edx
je 0x452da0
cmp dword [esi + 0xf0], 2
je 0x452fe0
mov ebp, dword [esi + 0x234]
test ebp, ebp
setne al
test al, al
je 0x4531e0
mov eax, dword [edi + 0x1ec]
mov dword [esp + 0x30], 0
lea ebp, [esp + 0x70]
cmp byte [eax + 0x47], 0
jne 0x452e20
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
xor eax, eax
mov dword [esp + 0x7c], 0
test byte [ebx + 0x85c], 8
lea ecx, [esp + 0x58]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x70], 0x10
sete al
shl eax, 0x1d
mov dword [esp + 0x14], eax
mov eax, dword [edx + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
sub esp, 0x20
test eax, eax
je 0x453190
mov eax, dword [esp + 0x58]
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, eax
and edx, 0xfffffffd
jne 0x452f90
cmp dword [esi + 0xf0], 2
je 0x453010
movzx eax, byte [esi + 0x24c]
xor ebx, ebx
shr al, 1
and eax, 1
test al, al
jne 0x453043
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x452d45
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
sub esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x452d65
mov eax, dword [esp + 0x30]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
sub esp, 8
mov eax, dword [esp + 0x58]
test eax, eax
je 0x452d79
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
sub esp, 4
mov eax, dword [esp + 0x54]
test eax, eax
je 0x452d8d
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
sub esp, 4
add esp, 0x12c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043ec30
mov dword [esp], ebx
mov dword [esp + 8], eax
mov ebx, 0x3c
mov dword [esp + 4], str.schannel:_Failed_to_read_remote_certificate_context:__s
call fcn.00460000
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x452d65
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
sub esp, 4
jmp 0x452d65
xor eax, eax
cmp dword [esi + 0x1a4], 0xffffffff
setne al
add eax, 0x20
shl eax, 4
cmp dword [esi + eax + 4], 2
je 0x452bf8
mov eax, dword [esi + 0xe4]
mov dword [esp + 0x34], eax
jmp 0x452c02
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 6
call fcn.004442a0
test al, al
jne 0x4531f1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x2000
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
sub esp, 0x14
test eax, eax
mov dword [esp + 0x30], eax
je 0x453645
cmp dword [esi + 0xf0], 2
je 0x453520
mov eax, dword [esi + 0x234]
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x40]
mov eax, dword [esi]
test ecx, ecx
mov dword [esp + 0x44], eax
je 0x45369d
mov eax, dword [esp + 0x40]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov dword [esp + 0x38], eax
je 0x453741
lea eax, [esp + 0x68]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
sub esp, 8
test eax, eax
je 0x453787
cmp dword [esp + 0x6c], 0
mov eax, dword [esp + 0x68]
mov dword [esp + 0x4c], eax
jl 0x45324e
jle 0x453243
mov eax, dword [esp + 0x44]
mov dword [esp + 8], 0x100000
mov ebx, 0x4d
mov dword [esp + 4], str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov dword [esp], eax
call fcn.00460000
mov dword [esp + 0x3c], 0
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [0x53638c]
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x452d39
jmp 0x452d4d
test al, 4
jne 0x453210
test eax, 0x10000
jne 0x453503
test al, 0x20
jne 0x453550
test al, 1
jne 0x453630
test al, 0x40
je 0x4535d1
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
mov dword [esp], ebx
call fcn.00460000
nop
lea esi, [esi]
mov ebx, 0x3c
jmp 0x452d31
xor eax, eax
cmp dword [esi + 0x1a4], 0xffffffff
setne al
add eax, 0x20
shl eax, 4
cmp dword [esi + eax + 4], 2
je 0x452c56
mov eax, dword [esi + 0x25c]
test eax, eax
setne al
jmp 0x452c61
xor eax, eax
cmp dword [esi + 0x1a4], 0xffffffff
setne al
add eax, 0x20
shl eax, 4
cmp dword [esi + eax + 4], 2
je 0x452d1b
movzx eax, byte [esi + 0x274]
xor ebx, ebx
shr al, 1
and eax, 1
test al, al
je 0x452d31
mov ecx, dword [esi]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10002
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 4], 6
mov dword [esp], eax
mov ebp, dword [sym.imp.CRYPT32.dll_CertGetNameStringA]
call ebp
sub esp, 0x18
test eax, eax
mov esi, eax
je 0x453684
mov dword [esp], eax
mov ebx, 0x1b
call dword [0x536390]
test eax, eax
mov edi, eax
je 0x452d31
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10002
mov dword [esp + 4], 6
mov dword [esp], eax
call ebp
sub esp, 0x18
cmp esi, eax
jne 0x453225
xor ebx, ebx
cmp byte [edi], 0
mov ebp, edi
je 0x45313c
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x34]
mov eax, ebp
mov ebp, edi
mov edi, eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00471a30
cmp eax, 1
je 0x453162
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], str.schannel:_connection_hostname___s__did_not_match_against_certificate_name___s__n
mov dword [esp], eax
call fcn.0045fe80
mov dword [esp], edi
call sub.msvcrt.dll_strlen
lea ebx, [ebx + eax + 1]
cmp dword [esp + 0x3c], ebx
jbe 0x45313c
lea edi, [ebp + ebx]
cmp byte [edi], 0
jne 0x4530f4
mov eax, dword [esp + 0x34]
mov dword [esp + 4], str.schannel:_CertGetNameString___failed_to_match_connection_hostname___s__against_server_certificate_names
mov ebx, 0x3c
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00460000
jmp 0x452d31
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], edi
xor ebx, ebx
mov dword [esp + 4], str.schannel:_connection_hostname___s__validated_against_certificate_name___s__n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.0045fe80
jmp 0x452d31
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp], ebx
mov dword [esp + 8], eax
mov ebx, 0x3c
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_failed:__s
call fcn.00460000
mov dword [esp + 0x58], 0
jmp 0x452d31
mov dword [esp + 0x30], 0
lea ebp, [esp + 0x70]
jmp 0x452c85
mov dword [esp], ebx
mov dword [esp + 4], str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
mov ebx, 0x4d
call fcn.00460000
jmp 0x452dd4
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
mov dword [esp], ebx
call fcn.00460000
jmp 0x452fd0
mov eax, dword [esp + 0x38]
mov dword [esp + 4], str.schannel:_CertGetNameString___returned_certificate_name_information_of_unexpected_size
mov ebx, 0x3c
mov dword [esp], eax
call fcn.00460000
jmp 0x452d31
cmp eax, 0x100000
ja 0x452f37
mov edi, dword [esp + 0x4c]
lea eax, [edi + 1]
mov dword [esp], eax
call dword [0x536390]
test eax, eax
mov dword [esp + 0x3c], eax
je 0x4537da
test edi, edi
mov eax, edi
je 0x45384f
xor edi, edi
lea ebp, [esp + 0x70]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x140], esi
mov ebx, edi
mov edi, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x70], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebp
lea esi, [eax + ebx]
mov eax, edi
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x453586
mov eax, dword [esp + 0x70]
test eax, eax
je 0x4532f0
add ebx, eax
cmp edi, ebx
ja 0x453289
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x140]
add edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x3c]
jmp 0x453301
mov edx, esi
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x140]
mov ebp, dword [esp + 0x3c]
mov byte [edx], 0
mov dword [esp + 0x48], 0
cmp byte [ebp], 0
je 0x45333c
mov dword [esp + 4], 0x5e668b
mov dword [esp], ebp
call sub.msvcrt.dll_strstr
test eax, eax
mov edi, eax
je 0x45333c
movzx eax, byte [eax + 0x1b]
cmp al, 0xd
je 0x453410
cmp al, 0xa
je 0x453410
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x40]
test edx, edx
jne 0x4537e4
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
mov dword [esp], eax
call fcn.0045fe80
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esp + 0x3c]
lea ebp, [esp + 0x70]
mov dword [esp], eax
call dword [0x53638c]
lea edx, [esp + 0x74]
xor eax, eax
mov ecx, 0xb
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x70], 0x30
mov dword [esp], ebp
mov dword [esp + 0x98], eax
lea eax, [esp + 0x5c]
mov dword [esp + 4], eax
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
sub esp, 8
test eax, eax
mov edx, dword [esp + 0x54]
jne 0x452c85
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp], ebx
mov dword [esp + 8], eax
mov ebx, 0x4d
mov dword [esp + 4], str.schannel:_failed_to_create_certificate_chain_engine:__s
call fcn.00460000
jmp 0x452f7d
mov dword [esp + 4], str._n_____END_CERTIFICATE_____
mov dword [esp], edi
call sub.msvcrt.dll_strstr
test eax, eax
je 0x453565
lea ebp, [eax + 0x1a]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x74], edi
mov dword [esp + 0x24], 0
mov eax, ebp
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
sub eax, edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x70], eax
lea eax, [esp + 0x60]
mov dword [esp + 0xc], 0xe
mov dword [esp + 8], 2
mov dword [esp], 2
mov dword [esp + 0x28], eax
lea eax, [esp + 0x64]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x70]
mov dword [esp + 4], eax
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
sub esp, 0x2c
test eax, eax
je 0x4535ea
mov eax, dword [esp + 0x64]
cmp eax, 1
je 0x4536f5
mov ecx, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call fcn.00460000
mov eax, dword [esp + 0x38]
mov ebx, 0x4d
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [0x53638c]
jmp 0x452f7d
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
mov dword [esp], ebx
call fcn.00460000
jmp 0x452fd0
xor eax, eax
cmp dword [esi + 0x1a4], 0xffffffff
setne al
add eax, 0x20
shl eax, 4
cmp dword [esi + eax + 4], 2
je 0x452e95
mov eax, dword [esi + 0x25c]
mov dword [esp + 0x40], eax
jmp 0x452e9f
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
mov dword [esp], ebx
call fcn.00460000
jmp 0x452fd0
mov eax, dword [esp + 0x40]
mov dword [esp + 4], str.schannel:_CA_file__s_is_not_correctly_formatted
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00460000
jmp 0x4534dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov ebx, 0x4d
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], str.schannel:_failed_to_read_from_CA_file__s:__s
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00460000
jmp 0x452f60
mov dword [esp + 8], edx
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_error_mask:_0x_08x
mov dword [esp], ebx
call fcn.00460000
jmp 0x452fd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00460000
jmp 0x4534dc
mov dword [esp + 4], str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
mov dword [esp], ebx
call fcn.00460000
jmp 0x452fd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp], ebx
mov dword [esp + 8], eax
mov ebx, 0x4d
mov dword [esp + 4], str.schannel:_failed_to_create_certificate_store:__s
call fcn.00460000
jmp 0x452dd4
mov eax, dword [esp + 0x38]
mov dword [esp + 4], str.schannel:_CertGetNameString___returned_no_certificate_name_information
mov dword [esp], eax
call fcn.00460000
jmp 0x452fd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 8], 0
mov dword [esp + 4], str.schannel:_invalid_path_name_for_CA_file__s:__s
mov dword [esp], eax
call fcn.00460000
mov dword [esp], 0
mov ebx, 0x4d
call dword [0x53638c]
jmp 0x452f7d
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
sub esp, 0x10
mov edi, eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
sub esp, 4
test edi, edi
je 0x453809
add dword [esp + 0x48], 1
jmp 0x45330c
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], str.schannel:_failed_to_open_CA_file__s:__s
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00460000
jmp 0x4536de
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov ebx, 0x4d
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00460000
mov dword [esp + 0x3c], 0
jmp 0x452f60
mov ebx, 0x1b
jmp 0x452f60
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 4], str.schannel:_added__d_certificate_s__from_CA_file__s_n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.0045fe80
jmp 0x453364
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0xa0]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0043e580
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.00460000
jmp 0x4534dc
mov edx, dword [esp + 0x3c]
mov ebp, edx
jmp 0x453301