Function at 0x409460
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 0x4094aa
cmp dword [esp + 0x658], ebp
je 0x4094aa
mov edi, dword [esp + 0x65c]
cmp edi, ebp
je 0x4094aa
cmp dword [esp + 0x660], ebp
jne 0x4094b1
xor esi, esi
jmp 0x409837
lea eax, [esp + 0x14]
push eax
push 0x14
call fcn.0040aba0
xor ecx, ecx
add esp, 8
test eax, eax
setge cl
mov esi, ecx
cmp esi, ebp
je 0x4097fc
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 0x409556
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 0x409556
mov eax, dword [esp + 0x10]
xor edx, edx
cmp edx, eax
sbb esi, esi
neg esi
je 0x409556
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.0040aba0
xor ecx, ecx
add esp, 0x14
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x409564
push str.Failed_to_initialize_private_key_n
call dword [sym.imp.msvcrt.dll_printf]
add esp, 4
cmp edi, 0xffffffff
je 0x409570
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4097fb
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 0x4095ef
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 0x4095c4
mov eax, dword [esp + 0x14]
test eax, eax
ja 0x4095c8
xor esi, esi
jmp 0x4095ef
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.0040aba0
xor ecx, ecx
add esp, 0x14
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x4095fd
push str.Failed_to_initialize_public_key_n
call dword [sym.imp.msvcrt.dll_printf]
add esp, 4
cmp edi, 0xffffffff
je 0x409609
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4097fb
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 0x409650
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 0x4097ef
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 0x4097ed
cmp dword [esp + 0x10], 0x2c
jne 0x4097ed
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push edi
call ebp
test eax, eax
je 0x4097ed
cmp dword [esp + 0x10], 4
jne 0x4097ed
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 0x4097ed
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
jne 0x4097ed
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.0040aba0
xor ecx, ecx
add esp, 0x18
test eax, eax
setge cl
mov esi, ecx
test esi, esi
jne 0x409773
push edi
push str.Failed_to_sign_file__s_n
call dword [sym.imp.msvcrt.dll_printf]
add esp, 8
jmp 0x4097fb
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 0x4097ef
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 0x4097ed
cmp dword [esp + 0x10], 4
jne 0x4097ed
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 0x4097ed
mov edx, dword [esp + 0x10]
cmp edx, dword [esp + 0x1c]
jne 0x4097ed
mov esi, 1
jmp 0x4097ef
xor esi, esi
cmp edi, 0xffffffff
je 0x4097fb
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, dword [esp + 0x1c]
xor ebp, ebp
cmp eax, ebp
je 0x409811
push eax
push 0x13
call fcn.0040aba0
add esp, 8
mov eax, dword [esp + 0x20]
cmp eax, ebp
je 0x409824
push eax
push 0x12
call fcn.0040aba0
add esp, 8
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x409837
push eax
push 0x15
call fcn.0040aba0
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