Function at 0x4037c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x4811c4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
call fcn.0040fdc0
mov esi, eax
add esp, 4
test esi, esi
jne 0x403828
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Could_not_open_file___S_.__d
call fcn.00405650
add esp, 0xc
xor al, al
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042111c
mov esp, ebp
pop ebp
ret 8
push ebx
push esi
call fcn.0040fa60
push 0
mov ebx, eax
push 0
push esi
mov dword [ebp - 0x7c], ebx
call fcn.00410210
lea ecx, [ebx + 1]
push ecx
call fcn.0042c6bd
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x403862
push str.Allocation_failure_n
call fcn.00405650
add esp, 4
jmp 0x403b9f
push 0
lea eax, [ebp - 0x78]
mov dword [ebp - 0x78], 0
push eax
push dword [ebp - 0x7c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403b79
cmp dword [ebp - 0x78], 0
je 0x403b79
push esi
call fcn.0040e1b0
add esp, 4
push dword [ebp - 0x7c]
push ebx
push 0x10001
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateContext]
push ebx
mov esi, eax
call fcn.0042c6a2
add esp, 4
test esi, esi
jne 0x4038d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4038c5
movzx eax, ax
or eax, 0x80070000
push eax
push edi
push str.CertCreateCertificateContextfailed_for_cert_file__S.___x_.
call fcn.00405650
add esp, 0xc
jmp 0x403b9f
lea eax, [ebp - 0x70]
push eax
call fcn.00418c70
push dword [esi + 8]
lea eax, [ebp - 0x70]
push dword [esi + 4]
push eax
call fcn.00418cc0
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00418b30
push str.MD5_cert_hash:
call fcn.00405650
add esp, 0x1c
xor esi, esi
lea ecx, [ecx]
movzx eax, byte [ebp + esi - 0x14]
push eax
push str._02x
call fcn.00405650
inc esi
add esp, 8
cmp esi, 0x10
jl 0x403910
push 0x4741e4
call fcn.00405650
add esp, 4
lea eax, [ebp - 0x74]
push eax
call fcn.00401940
mov esi, eax
test esi, esi
je 0x40395d
push str.VtpValidationControlCreate_failed._n
call fcn.00405650
add esp, 4
push esi
call fcn.00403140
jmp 0x403b9f
mov ecx, dword [ebp - 0x74]
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
jne 0x403983
push str.GetVtpServiceVersionData_returned_NULL
call fcn.00405650
mov ecx, dword [ebp - 0x74]
add esp, 4
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403b9f
push eax
push str.VTP_VERSION:__S_n
call fcn.00405650
push edi
call fcn.0040fdc0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4039bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Could_not_open_file___S_.__d
call fcn.00405650
mov ecx, dword [ebp - 0x74]
add esp, 0xc
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403b9f
push esi
call fcn.0040fa60
push 0
mov ebx, eax
push 0
push esi
mov dword [ebp - 0x7c], ebx
call fcn.00410210
lea ecx, [ebx + 1]
push ecx
call fcn.0042c6bd
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x403a07
push str.Allocation_failure_n
call fcn.00405650
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x74]
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403b9f
push 0
lea eax, [ebp - 0x78]
mov dword [ebp - 0x78], 0
push eax
push dword [ebp - 0x7c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403b4e
cmp dword [ebp - 0x78], 0
je 0x403b4e
push esi
call fcn.0040e1b0
add esp, 4
push dword [ebp - 0x7c]
push ebx
push 0x10001
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateContext]
push ebx
mov esi, eax
call fcn.0042c6a2
add esp, 4
test esi, esi
jne 0x403a76
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x403a6a
movzx eax, ax
or eax, 0x80070000
push eax
push edi
push str.CertCreateCertificateContextfailed_for_cert_file__S.___x_.
jmp 0x4039aa
mov ecx, dword [ebp - 0x74]
lea edx, [ebp - 0x84]
push edx
push dword [esi + 8]
push dword [esi + 4]
mov eax, dword [ecx]
push 0x10001
call dword [eax + 0x18]
test eax, eax
je 0x403ab2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x403aa6
movzx eax, ax
or eax, 0x80070000
push eax
push edi
push str.ValidateCertificate_failed_for_cert_file__S.___x_.
jmp 0x4039aa
push dword [ebp - 0x84]
lea eax, [ebp - 0x90]
push eax
call fcn.004019f0
mov eax, dword [eax]
test eax, eax
jne 0x403acf
mov eax, 0x472cd0
push eax
push str.validation_state_S_n
call fcn.00405650
add esp, 8
lea ecx, [ebp - 0x90]
call fcn.00410a40
push dword [ebp - 0x80]
lea eax, [ebp - 0x90]
push eax
call fcn.004017a0
mov eax, dword [eax]
test eax, eax
jne 0x403b02
mov eax, 0x472cd0
push eax
push str.privileges_S_n
call fcn.00405650
add esp, 8
lea ecx, [ebp - 0x90]
call fcn.00410a40
mov ecx, dword [ebp - 0x74]
mov eax, dword [ecx]
call dword [eax + 4]
push esi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test byte [ebp - 0x84], 2
je 0x403b9f
test byte [ebp - 0x80], 1
je 0x403b9f
pop ebx
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042111c
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Error_reading_cert_file___S_.__d
call fcn.00405650
push esi
call fcn.0040e1b0
push ebx
call fcn.0042c6a2
mov ecx, dword [ebp - 0x74]
add esp, 0x14
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403b9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [0x481c84]
push str.Error_reading_cert_file___S_.__d
call fcn.00405650
push esi
call fcn.0040e1b0
push ebx
call fcn.0042c6a2
add esp, 0x14
mov ecx, dword [ebp - 4]
xor al, al
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0042111c
mov esp, ebp
pop ebp
ret 8