Function at 0x406b96
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 [0x455474]
test eax, eax
jne 0x406ec5
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.00432ae0
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov dword [esp], str.certs
call fcn.004047a0
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.004290b0
test eax, eax
setne al
test al, al
je 0x406d0f
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.004290d0
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 0x406c3f
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x20
jne 0x406c39
mov eax, dword [0x455474]
add eax, 1
mov dword [0x455474], eax
add dword [ebp - 0xc], 1
jmp 0x406c0e
mov eax, dword [0x455474]
shl eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [0x455488], eax
mov dword [0x455474], 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 0x406e7f
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
movzx eax, byte [eax]
cmp al, 0x20
jne 0x406d06
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.0040781a
lea eax, [ebp - 0x5c]
mov ecx, eax
call fcn.004290b0
mov ebx, eax
lea eax, [ebp - 0x5c]
mov ecx, eax
call fcn.004290d0
mov edx, eax
mov esi, dword [0x455488]
mov eax, dword [0x455474]
lea ecx, [eax + 1]
mov dword [0x455474], 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.00433270
add dword [ebp - 0xc], 1
jmp 0x406c65
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.00432ae0
lea eax, [ebp - 0x74]
mov dword [esp + 4], eax
mov dword [esp], str.CertificateFile
call fcn.004047a0
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.004290b0
test eax, eax
sete al
test al, al
je 0x406d49
mov ebx, 0
jmp 0x406e69
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.004290d0
mov dword [esp + 4], 0x43bd3b
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x406e4a
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 0x406dfd
jmp 0x406d93
mov dword [0x455474], 1
mov dword [esp], 4
call sub.msvcrt.dll_malloc
mov dword [0x455488], eax
mov eax, dword [ebp - 0x1c]
mov ebx, dword [0x455488]
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 0x406e64
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.004290d0
mov dword [esp + 4], eax
mov dword [esp], str.Unable_to_load_certificate_file__s_n
call fcn.00405008
mov ebx, 1
lea eax, [ebp - 0x74]
mov ecx, eax
call fcn.00433270
cmp ebx, 1
je 0x406e7f
mov ebx, 0
jmp 0x406e84
mov ebx, 1
lea eax, [ebp - 0x44]
mov ecx, eax
call fcn.00433270
cmp ebx, 1
jmp 0x406ec5
nop
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret