Function at 0x408de0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x644
mov eax, 0x200
push ebp
xor ebp, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 8], eax
cmp dword [esp + 0x64c], ebp
push esi
push edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
je 0x408e2a
cmp dword [esp + 0x658], ebp
je 0x408e2a
mov edi, dword [esp + 0x65c]
cmp edi, ebp
je 0x408e2a
cmp dword [esp + 0x660], ebp
jne 0x408e31
xor esi, esi
jmp 0x4091b7
lea eax, [esp + 0x14]
push eax
push 0x14
call fcn.0040a520
xor ecx, ecx
add esp, 8
test eax, eax
setge cl
mov esi, ecx
cmp esi, ebp
je 0x40917c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebp
push 0x80
push 3
push ebp
push 1
push SysReAllocString
push edi
call ebx
xor edx, edx
mov edi, eax
cmp edi, 0xffffffff
setne dl
mov esi, edx
cmp esi, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
je 0x408ed6
push 0
lea eax, [esp + 0x14]
push eax
push 0x200
lea ecx, [esp + 0x260]
push ecx
push edi
call ebp
mov esi, eax
test esi, esi
je 0x408ed6
mov eax, dword [esp + 0x10]
xor edx, edx
cmp edx, eax
sbb esi, esi
neg esi
je 0x408ed6
lea ecx, [esp + 0x20]
push ecx
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x25c]
push edx
push eax
push 0xc
call fcn.0040a520
xor ecx, ecx
add esp, 0x14
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x408ee4
push str.Failed_to_initialize_private_key_n
call dword [sym.imp.msvcrt.dll_printf]
add esp, 4
cmp edi, 0xffffffff
je 0x408ef0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40917b
mov edx, dword [esp + 0x65c]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edx
call ebx
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov esi, eax
test esi, esi
je 0x408f6f
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0x60]
push eax
push edi
call ebp
test eax, eax
je 0x408f44
mov eax, dword [esp + 0x14]
test eax, eax
ja 0x408f48
xor esi, esi
jmp 0x408f6f
lea ecx, [esp + 0x24]
push ecx
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x5c]
push edx
push eax
push 0xd
call fcn.0040a520
xor ecx, ecx
add esp, 0x14
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x408f7d
push str.Failed_to_initialize_public_key_n
call dword [sym.imp.msvcrt.dll_printf]
add esp, 4
cmp edi, 0xffffffff
je 0x408f89
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40917b
mov eax, dword [esp + 0x664]
xor edx, edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
lea edx, [esp + 0x2c]
mov dword [esp + 0x28], 0x2c
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408fd0
mov ecx, dword [esp + 0x658]
mov eax, dword [esp + 0x668]
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], 0x554654
call ebx
xor edx, edx
mov edi, eax
cmp edi, 0xffffffff
setne dl
mov esi, edx
test esi, esi
je 0x40916f
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [esp + 0x14]
push eax
push 0x2c
lea ecx, [esp + 0x34]
push ecx
push edi
call ebp
test eax, eax
je 0x40916d
cmp dword [esp + 0x10], 0x2c
jne 0x40916d
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push edi
call ebp
test eax, eax
je 0x40916d
cmp dword [esp + 0x10], 4
jne 0x40916d
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x60]
push eax
push edi
call ebp
test eax, eax
je 0x40916d
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
jne 0x40916d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x658]
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x458]
push eax
push edi
push ecx
push edx
push 0x18
call fcn.0040a520
xor ecx, ecx
add esp, 0x18
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x4090f3
push edi
push str.Failed_to_sign_file__s_n
call dword [sym.imp.msvcrt.dll_printf]
add esp, 8
jmp 0x40917b
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push edi
call ebx
xor edx, edx
mov edi, eax
cmp edi, 0xffffffff
setne dl
mov esi, edx
test esi, esi
je 0x40916f
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push edi
call ebp
test eax, eax
je 0x40916d
cmp dword [esp + 0x10], 4
jne 0x40916d
mov eax, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x460]
push ecx
push edi
call ebp
test eax, eax
je 0x40916d
mov edx, dword [esp + 0x10]
cmp edx, dword [esp + 0x1c]
jne 0x40916d
mov esi, 1
jmp 0x40916f
xor esi, esi
cmp edi, 0xffffffff
je 0x40917b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, dword [esp + 0x1c]
xor ebp, ebp
cmp eax, ebp
je 0x409191
push eax
push 0x13
call fcn.0040a520
add esp, 8
mov eax, dword [esp + 0x20]
cmp eax, ebp
je 0x4091a4
push eax
push 0x12
call fcn.0040a520
add esp, 8
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x4091b7
push eax
push 0x15
call fcn.0040a520
add esp, 8
xor eax, eax
cmp esi, ebp
setne al
pop edi
pop esi
pop ebp
dec eax
and eax, reloc.OLEAUT32.dll_VariantClear
add esp, 0x644
ret