Function at 0x40bfd6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x90
mov dword [ebp - 0x7c], ecx
mov eax, dword [0x871234]
test eax, eax
jne 0x40c305
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.005393a0
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov dword [esp], str.certs
call fcn.00409be0
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.004bfb00
test eax, eax
setne al
test al, al
je 0x40c14f
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.004bfb20
mov dword [esp], eax
call sub.msvcrt.dll__strdup
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x40c07f
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x20
jne 0x40c079
mov eax, dword [0x871234]
add eax, 1
mov dword [0x871234], eax
add dword [ebp - 0xc], 1
jmp 0x40c04e
mov eax, dword [0x871234]
shl eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [0x871248], eax
mov dword [0x871234], 0
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x40c2bf
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x20
jne 0x40c146
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
mov byte [eax], 0
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041b5d2
lea eax, [ebp - 0x5c]
mov ecx, eax
call fcn.004bfb00
mov ebx, eax
lea eax, [ebp - 0x5c]
mov ecx, eax
call fcn.004bfb20
mov edx, eax
mov esi, dword [0x871248]
mov eax, dword [0x871234]
lea ecx, [eax + 1]
mov dword [0x871234], ecx
shl eax, 2
add esi, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], 1
call sub.CRYPT32.dll_CertCreateCertificateContext
sub esp, 0xc
mov dword [esi], eax
mov eax, dword [ebp - 0xc]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x2c]
add eax, edx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x5c]
mov ecx, eax
call fcn.00539b30
add dword [ebp - 0xc], 1
jmp 0x40c0a5
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.005393a0
lea eax, [ebp - 0x74]
mov dword [esp + 4], eax
mov dword [esp], str.CertificateFile
call fcn.00409be0
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.004bfb00
test eax, eax
sete al
test al, al
je 0x40c189
mov ebx, 0
jmp 0x40c2a9
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0x800
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.004bfb20
mov dword [esp + 4], 0x5751bf
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40c28a
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x1c]
mov edx, eax
mov eax, dword [ebp - 0x20]
sub eax, edx
add eax, 1
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
add ecx, edx
mov edx, dword [ebp - 0x24]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ecx
call sub.msvcrt.dll_fread
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
add dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
add eax, edx
mov byte [eax], 0
cmp dword [ebp - 0x28], 0
jle 0x40c23d
jmp 0x40c1d3
mov dword [0x871234], 1
mov dword [esp], 4
call sub.msvcrt.dll_malloc
mov dword [0x871248], eax
mov eax, dword [ebp - 0x1c]
mov ebx, dword [0x871248]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov dword [esp], 1
call sub.CRYPT32.dll_CertCreateCertificateContext
sub esp, 0xc
mov dword [ebx], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
jmp 0x40c2a4
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.004bfb20
mov dword [esp + 4], eax
mov dword [esp], str.Unable_to_load_certificate_file__s_n
call fcn.0040a448
mov ebx, 1
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.00539b30
cmp ebx, 1
je 0x40c2bf
mov ebx, 0
jmp 0x40c2c4
mov ebx, 1
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.00539b30
cmp ebx, 1
jmp 0x40c305
nop
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret