Function at 0x403f30
Capabilities:
Get hostname
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 8]
mov dword [ebp - 0x24], 0
mov ecx, dword [0x423040]
movzx ebx, word [esi + 8]
mov dword [esp], ecx
mov dword [esp + 4], ebx
call fcn.0040b5f0
mov dword [ebp - 0x10], eax
xor edx, edx
mov ebx, eax
mov dword [esp + 8], edx
mov eax, 0x41ba1b
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040e9e0
mov dword [ebp - 0x28], eax
test eax, eax
je 0x40429e
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.0040ced0
mov dword [ebp - 0x1c], 0
mov edi, dword [ebp + 0xc]
cmp dword [ebp - 0x1c], edi
nop
lea esi, [esi]
jge 0x40431d
mov eax, dword [0x423048]
xor edi, edi
test eax, eax
je 0x404024
mov dword [esp], eax
call fcn.0040cf00
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], 0
jmp 0x403fff
mov ecx, dword [ebp - 0x24]
mov esi, 4
mov dword [esp + 8], esi
lea esi, [edi + 1]
mov dword [esp], ecx
mov dword [esp + 4], esi
call fcn.0040ce40
mov dword [ebp - 0x24], eax
mov dword [esp], ebx
call fcn.0040cf00
mov edx, dword [ebp - 0x24]
mov dword [edx + edi*4], eax
cmp byte [eax], 0
je 0x404292
mov edi, esi
mov eax, 0x41beb0
lea ebx, [ebp - 0x10]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msys_1.0.dll_strsep
test eax, eax
mov ebx, eax
jne 0x403fc8
mov edx, dword [ebp - 0x2c]
mov dword [esp], edx
call fcn.0040ced0
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp + 0x10]
movzx ecx, word [edx + 8]
mov dword [esp + 4], ecx
mov esi, dword [ebx + eax*4]
mov dword [esp], esi
call fcn.0040b5f0
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x14]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040eb10
mov dword [ebp - 0x20], eax
test eax, eax
je 0x404375
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ecx]
dec ebx
cmp ebx, 1
ja 0x404391
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
call fcn.00408d00
test eax, eax
jne 0x40434f
mov edx, dword [ebp - 0x20]
mov eax, dword [0x41b004]
mov ebx, dword [0x423044]
mov esi, dword [edx + 0x10]
mov dword [esi + 0x10], eax
mov dword [esp], ebx
call fcn.0040cf00
mov dword [esi + 0x14], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov eax, dword [0x423050]
mov esi, dword [ecx + 0x10]
mov ebx, dword [0x41b008]
mov dword [esi + 0x18], edi
mov edi, dword [0x423054]
mov dword [esi + 0x1c], edx
mov edx, dword [0x41b00c]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edi
mov dword [esi + 0x2c], edx
mov dword [esi + 0x28], ebx
mov dword [ebp - 0x34], esi
add esi, 0x30
mov dword [esp], esi
call fcn.00403c10
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
mov edi, dword [ecx + 0x10]
mov dword [esp], eax
call fcn.00407ea0
mov dword [edi + 0x40], eax
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00408fe0
test eax, eax
jne 0x404362
mov ecx, dword [ebp - 0x10]
mov esi, 0x2e
mov dword [esp + 4], esi
mov dword [esp], ecx
call sub.msys_1.0.dll_strrchr
test eax, eax
je 0x404138
cld
mov edi, 0x41c151
mov esi, eax
mov ecx, 5
repe cmpsb byte [esi], byte es:[edi]
jne 0x404138
mov byte [eax], 0
mov ebx, dword [ebp - 0x10]
mov ecx, str._s_cert.pub
lea esi, [ebp - 0x18]
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 8], ebx
call fcn.0040cf70
mov edi, dword [ebp - 0x10]
mov dword [esp], edi
call fcn.0040ced0
mov ebx, dword [ebp - 0x18]
mov edx, 0x1a4
mov eax, 0x601
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00415a10
cmp eax, 0xffffffff
je 0x404329
mov dword [esp], eax
mov edi, 0x41be4e
mov dword [esp + 4], edi
call sub.msys_1.0.dll_fdopen
test eax, eax
mov ebx, eax
je 0x4043b9
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00407830
test eax, eax
je 0x4043e1
mov dword [esp], ebx
mov esi, dword [ebp - 0x14]
mov edi, str.__s_n
mov dword [esp + 4], edi
mov dword [esp + 8], esi
call sub.msys_1.0.dll_fprintf
mov dword [esp], ebx
call sub.msys_1.0.dll_fclose
mov edx, dword [0x423014]
test edx, edx
je 0x404204
mov ebx, dword [ebp - 0x20]
mov dword [esp], ebx
call fcn.004067f0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.0040ced0
inc dword [ebp - 0x1c]
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 0x1c], ecx
jmp 0x403fa0
mov edx, dword [0x41b008]
mov ebx, dword [0x41b00c]
mov eax, dword [0x423050]
mov dword [esp + 8], edx
mov ecx, dword [0x423054]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00403a70
mov dword [esp + 0x18], eax
mov eax, dword [0x423048]
test eax, eax
mov edx, eax
jne 0x404243
mov edx, 0x41ba1b
mov dword [esp + 0x14], edx
test eax, eax
mov edx, str._for
jne 0x404255
mov edx, 0x41ba1b
cmp dword [0x41b004], 1
mov dword [esp + 0x10], edx
mov eax, str.user
mov esi, dword [0x423044]
mov edi, dword [ebp - 0x18]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
je 0x40427d
mov eax, str.host
mov dword [esp + 4], eax
mov dword [esp], str.Signed__s_key__s:_id___s__s_s_valid__s
call fcn.0040a6d0
jmp 0x4041e0
mov dword [esp], str.Empty_principal_name
call fcn.00411b20
mov eax, dword [0x423034]
test eax, eax
jne 0x404313
mov dword [esp], str.Enter_passphrase:
mov edi, 2
mov dword [esp + 4], edi
call fcn.00411e00
mov dword [esp + 4], eax
xor ecx, ecx
mov esi, eax
mov dword [esp + 8], ecx
mov dword [esp], ebx
call fcn.0040e9e0
mov dword [ebp - 0x28], eax
mov dword [esp], esi
call sub.msys_1.0.dll_strlen
mov dword [esp + 8], eax
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msys_1.0.dll_memset
mov dword [esp], esi
call fcn.0040ced0
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x403f80
mov dword [esp], str.Couldnt_load_CA_key___s_
mov ebx, dword [ebp - 0x10]
mov dword [esp + 4], ebx
call fcn.00411b20
mov dword [esp], eax
call fcn.0040cf00
jmp 0x4042bc
mov dword [esp], 0
call sub.msys_1.0.dll_exit
call sub.msys_1.0.dll___errno
mov edx, dword [eax]
mov dword [esp], edx
call sub.msys_1.0.dll_strerror
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], str.Could_not_open___s__for_writing:__s
mov dword [esp + 4], eax
call fcn.00411b20
mov dword [esp], str.Could_not_upgrade_key__s_to_certificate
mov edi, dword [ebp - 0x10]
mov dword [esp + 4], edi
call fcn.00411b20
mov dword [esp], str.Couldnt_not_certify_key__s
mov edi, dword [ebp - 0x10]
mov dword [esp + 4], edi
call fcn.00411b20
mov dword [esp], str._s:_unable_to_open___s_
mov esi, dword [ebp - 0x10]
mov edi, str.do_ca_sign
mov dword [esp + 4], edi
mov dword [esp + 8], esi
call fcn.00411b20
mov dword [esp], ecx
call fcn.00407a40
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x10]
mov eax, str.do_ca_sign
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp], str._s:_key___s__type__s_cannot_be_certified
call fcn.00411b20
call sub.msys_1.0.dll___errno
mov ecx, dword [eax]
mov esi, str.do_ca_sign
mov dword [esp], ecx
call sub.msys_1.0.dll_strerror
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], str._s:_fdopen:__s
call fcn.00411b20
mov dword [esp], str.Could_not_write_certified_key_to__s
mov ebx, dword [ebp - 0x18]
mov dword [esp + 4], ebx
call fcn.00411b20
lea esi, [esi]
lea edi, [edi]