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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4529a0
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x46b554]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x458148
push 0x458140
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], ecx
call fcn.00430b5b
mov esi, eax
xor edi, edi
add esp, 8
cmp esi, edi
jne 0x4086ed
push str.keyfile_doesnt_exist_n
call fcn.004309e2
jmp 0x4088b6
push 2
push edi
push esi
call fcn.00431339
push esi
call fcn.0043124a
push edi
mov ebx, eax
push edi
push esi
mov dword [ebp - 0x3c], ebx
call fcn.00431339
push ebx
call fcn.0043094e
push esi
push ebx
push 1
push eax
mov dword [ebp - 0x38], eax
call fcn.00430dbc
push esi
call fcn.00431422
xor ebx, ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], edi
mov byte [ebp - 0x30], bl
mov edx, dword [ebp - 0x40]
push 0x458148
push edx
mov byte [ebp - 4], 1
call fcn.00430b5b
mov edi, eax
add esp, 0x3c
test edi, edi
je 0x40887c
push 2
push ebx
push edi
call fcn.00431339
push edi
call fcn.0043124a
mov ecx, eax
mov eax, dword [ebp - 0x20]
add esp, 0x10
lea esi, [ebp - 0x30]
cmp ecx, eax
ja 0x408784
or eax, 0xffffffff
call fcn.00404fd0
jmp 0x40878d
mov ebx, ecx
sub ebx, eax
call fcn.00404d60
push 0
push 0
push edi
call fcn.00431339
mov eax, dword [ebp - 0x30]
mov esi, 0x10
add esp, 0xc
cmp dword [ebp - 0x1c], esi
jae 0x4087aa
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0x20]
push edi
push ecx
push 1
push eax
call fcn.00430dbc
push edi
call fcn.00431422
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
push edx
push eax
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x30]
call fcn.00406b60
add esp, 0x1c
test al, al
je 0x408879
mov ecx, dword [ebp - 0x34]
push 0x45813c
push ecx
call fcn.00430b5b
mov edi, eax
add esp, 8
test edi, edi
je 0x408879
push str._code_
push edi
call fcn.00430dd9
mov eax, dword [ebp - 0x30]
add esp, 8
cmp dword [ebp - 0x1c], esi
jae 0x40880f
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x20]
push edi
push edx
push 1
push eax
call fcn.0043103c
push str.__code__n_signature__n
push edi
call fcn.00430dd9
mov eax, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x50]
add esp, 0x18
xor esi, esi
sub eax, ebx
mov dword [ebp - 0x34], eax
je 0x408859
lea esp, [esp]
movzx eax, byte [ebx + esi]
push eax
push str._02X
push edi
call fcn.00430dd9
inc esi
add esp, 0xc
cmp esi, dword [ebp - 0x34]
jb 0x408840
push str._n__signature_
push edi
call fcn.00430dd9
push edi
call fcn.00431422
push str.Signed_n
call fcn.004309e2
add esp, 0x10
jmp 0x40887c
mov ebx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00430914
add esp, 4
cmp dword [ebp - 0x1c], 0x10
jb 0x40889a
mov edx, dword [ebp - 0x30]
push edx
call fcn.0042f9a7
add esp, 4
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
test ebx, ebx
je 0x4088b9
push ebx
call fcn.0042f9a7
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042f9b2
mov esp, ebp
pop ebp
ret