Function at 0x401544
Capabilities:
Delete file
Execute command
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
sub esp, 0xd50
mov eax, dword [ebp + 0x20]
mov byte [ebp - 0xd2c], al
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [esp + 4], 0x40c064
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4015c2
mov dword [esp + 8], 0xd4
mov dword [esp + 4], str._genSubSecureInfo
mov dword [esp], str.e_0_31m_ERROR___s:_d:_e_0m
call sub.msvcrt.dll_printf
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__open__s_fail_n
call sub.msvcrt.dll_printf
mov eax, 0xffffffff
jmp 0x401945
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x14], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp byte [ebp - 0xd2c], 0
jne 0x401633
mov eax, dword [str.SECURITYINTERLVE]
mov edx, dword [0x40b008]
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], edx
jmp 0x40164a
mov eax, dword [0x40b00c]
mov edx, dword [0x40b010]
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], edx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x118], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str._srsa_sign__s__s
lea eax, [ebp - 0x524]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x524]
mov dword [esp], eax
call sub.msvcrt.dll_system
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
lea eax, [ebp - 0x924]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x924]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov ebx, eax
mov eax, ebx
mov ecx, 0xffffffff
mov edx, eax
mov eax, 0
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
sub eax, 1
add eax, ebx
mov dword [eax], 0x6769732e
mov byte [eax + 4], 0
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
lea eax, [ebp - 0xd24]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0xd24]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov ebx, eax
mov eax, ebx
mov ecx, 0xffffffff
mov edx, eax
mov eax, 0
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
sub eax, 1
add eax, ebx
mov dword [eax], 0x6769732e
mov dword [eax + 4], 0x6e69622e
mov byte [eax + 8], 0
mov dword [esp + 4], 0x40c064
lea eax, [ebp - 0xd24]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4017ab
mov dword [esp + 8], 0xf2
mov dword [esp + 4], str._genSubSecureInfo
mov dword [esp], str.e_0_31m_ERROR___s:_d:_e_0m
call sub.msvcrt.dll_printf
lea eax, [ebp - 0xd24]
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__open__s_fail_n
call sub.msvcrt.dll_printf
mov eax, 0xffffffff
jmp 0x401945
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
mov dword [ebp - 0x14], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x100
lea eax, [ebp - 0x124]
add eax, 0x10
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x924]
mov dword [esp], eax
call sub.msvcrt.dll_remove
test eax, eax
je 0x401870
mov dword [esp + 8], 0xfe
mov dword [esp + 4], str._genSubSecureInfo
mov dword [esp], str.e_0_31m_ERROR___s:_d:_e_0m
call sub.msvcrt.dll_printf
lea eax, [ebp - 0x924]
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__remove__s_fail_n
call sub.msvcrt.dll_printf
mov eax, 0xffffffff
jmp 0x401945
lea eax, [ebp - 0xd24]
mov dword [esp], eax
call sub.msvcrt.dll_remove
test eax, eax
je 0x4018be
mov dword [esp + 8], 0x103
mov dword [esp + 4], str._genSubSecureInfo
mov dword [esp], str.e_0_31m_ERROR___s:_d:_e_0m
call sub.msvcrt.dll_printf
lea eax, [ebp - 0xd24]
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__remove__s_fail_n
call sub.msvcrt.dll_printf
mov eax, 0xffffffff
jmp 0x401945
mov dword [esp + 4], 0x40c0c1
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401910
mov dword [esp + 8], 0x109
mov dword [esp + 4], str._genSubSecureInfo
mov dword [esp], str.e_0_31m_ERROR___s:_d:_e_0m
call sub.msvcrt.dll_printf
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str._ERROR__open__s_fail_n
call sub.msvcrt.dll_printf
mov eax, 0xffffffff
jmp 0x401945
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x110
lea eax, [ebp - 0x124]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, 0
add esp, 0xd50
pop ebx
pop edi
pop ebp
ret