Function at 0x408360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov eax, 0x407c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00418c10
cld
lea eax, [ebp - 0x4078]
mov esi, str.SSH_PRIVATE_KEY_FILE_FORMAT_1.1_n
mov dword [ebp - 0x4084], eax
mov edi, eax
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov al, byte [0x41c690]
mov byte [ebp - 0x4056], 0
mov byte [edi], al
mov byte [ebp - 0x4055], 0
cmp dword [ebp + 0x10], 1
sbb eax, eax
mov edx, dword [ebp + 0xc]
xor eax, 0xffffffff
sub esp, 0xc
and eax, 3
mov byte [ebp - 0x4054], 0
mov byte [ebp - 0x4057], al
mov byte [ebp - 0x4053], 0
mov eax, dword [edx + 8]
push eax
call fcn.0040d250
sar eax, 0x18
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 0x4052], al
pop eax
mov eax, dword [ecx + 8]
push eax
call fcn.0040d250
sar eax, 0x10
mov byte [ebp - 0x4051], al
pop eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
push eax
call fcn.0040d250
sar eax, 8
mov edx, dword [ebp + 0xc]
mov byte [ebp - 0x4050], al
pop eax
mov edi, dword [edx + 8]
push edi
call fcn.0040d250
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 0x404f], al
pop ebx
lea ebx, [ebp - 0x404e]
pop esi
mov ecx, dword [ecx + 8]
push ecx
push ebx
call fcn.0040d370
lea ebx, [eax + ebx]
pop eax
mov eax, dword [ebp + 0xc]
pop edx
mov eax, dword [eax + 0xc]
push eax
push ebx
call fcn.0040d370
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + 0x20]
add esp, 0x10
lea ebx, [eax + ebx]
test esi, esi
je 0x408629
sub esp, 0xc
push esi
call sub.msvcrt.dll_strlen
shr eax, 0x18
mov byte [ebx], al
mov dword [esp], esi
call sub.msvcrt.dll_strlen
shr eax, 0x10
mov byte [ebx + 1], al
mov dword [esp], esi
call sub.msvcrt.dll_strlen
shr eax, 8
mov byte [ebx + 2], al
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov byte [ebx + 3], al
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add esp, 0xc
add ebx, 4
push eax
push esi
push ebx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp + 0xc]
pop eax
mov eax, dword [ecx + 0x20]
push eax
call sub.msvcrt.dll_strlen
add eax, ebx
add esp, 0x10
mov dword [ebp - 0x4080], eax
call fcn.00411990
mov edx, dword [ebp - 0x4080]
mov byte [edx], al
call fcn.00411990
mov ecx, dword [ebp - 0x4080]
mov ebx, ecx
mov byte [ecx + 1], al
mov eax, ecx
add eax, 2
add ebx, 4
mov dl, byte [eax - 2]
mov byte [ecx + 2], dl
mov dl, byte [eax - 1]
mov byte [eax + 1], dl
push eax
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x10]
push eax
push ebx
call fcn.0040d370
mov edx, dword [ebp + 0xc]
pop esi
mov ecx, dword [edx + 0x1c]
pop edi
lea ebx, [eax + ebx]
push ecx
push ebx
call fcn.0040d370
mov ecx, dword [ebp + 0xc]
lea ebx, [eax + ebx]
pop eax
mov eax, dword [ecx + 0x18]
pop edx
push eax
push ebx
call fcn.0040d370
pop edi
lea ebx, [eax + ebx]
pop eax
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 0x14]
push esi
push ebx
call fcn.0040d370
add esp, 0x10
lea edi, [eax + ebx]
mov ebx, dword [ebp - 0x4080]
mov esi, edi
sub esi, ebx
test esi, 7
je 0x408567
lea eax, [edi + 1]
mov ecx, dword [ebp - 0x4080]
mov edx, eax
sub edx, ecx
jmp 0x408555
lea eax, [edi + 1]
mov esi, edx
mov byte [edi], 0
lea edx, [edx + 1]
mov edi, eax
test esi, 7
jne 0x408552
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4085ce
sub esp, 0xc
lea ebx, [ebp - 0x78]
push ebx
call fcn.00411c60
pop eax
mov eax, dword [ebp + 0x10]
push eax
call sub.msvcrt.dll_strlen
add esp, 0xc
push eax
mov eax, dword [ebp + 0x10]
push eax
push ebx
call fcn.00411cd0
pop ecx
pop eax
push ebx
lea ebx, [ebp - 0x1c]
push ebx
call fcn.00412610
add esp, 0xc
mov edx, dword [ebp - 0x4080]
push esi
push edx
push ebx
call fcn.00411530
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
add esp, 0x10
push eax
push eax
mov eax, dword [ebp + 8]
push 0x41c8e6
push eax
call sub.msvcrt.dll_fopen
add esp, 0x10
xor edx, edx
mov ebx, eax
test eax, eax
je 0x40861f
mov esi, edi
mov eax, dword [ebp - 0x4084]
lea edx, [ebp - 0x4078]
sub esi, eax
push ebx
push esi
push 1
push edx
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
mov edi, eax
call sub.msvcrt.dll_fclose
add esp, 0x10
xor edx, edx
test eax, eax
jne 0x40861f
cmp esi, edi
sete al
xor edx, edx
mov dl, al
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [ebx], 0
mov byte [ebx + 1], 0
mov byte [ebx + 2], 0
mov byte [ebx + 3], 0
add ebx, 4
mov dword [ebp - 0x4080], ebx
jmp 0x4084b5