Function at 0x5fa9e0
Capabilities:
Create process on windows
Hide graphical window
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb84
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x474], edx
mov dword [ebp - 0x478], edx
mov dword [ebp - 0x47c], edx
mov dword [ebp - 0x470], edx
mov dword [ebp - 0x46c], edx
mov dword [ebp - 0x464], edx
mov dword [ebp - 0x468], edx
mov dword [ebp - 0x460], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x5fae6d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x20], 0
jne 0x5fae42
mov eax, dword [ebp - 0xc]
cmp dword [eax + 8], 0
jne 0x5faa82
lea edx, [ebp - 0x460]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.004068dc
lea eax, [ebp - 0x460]
mov edx, 0x5fae88
call fcn.004098fc
mov ecx, dword [ebp - 0x460]
mov dl, 1
mov eax, dword [0x5fa020]
call fcn.004287c4
call fcn.00407d8c
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dl, 1
call fcn.0042269c
test al, al
jne 0x5faae0
lea edx, [ebp - 0x468]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.004068dc
push dword [ebp - 0x468]
push 0x5faecc
mov eax, dword [ebp - 0xc]
push dword [eax + 8]
push 0x5faeec
lea eax, [ebp - 0x464]
mov edx, 4
call fcn.004099dc
mov ecx, dword [ebp - 0x464]
mov dl, 1
mov eax, dword [0x5fa020]
call fcn.004287c4
call fcn.00407d8c
call fcn.005f5120
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], edx
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x20], 1
xor eax, eax
push ebp
push 0x5fae3b
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetConsoleWindow
test eax, eax
jne 0x5fab11
call sub.kernel32.dll_AllocConsole
push 0
call sub.kernel32.dll_GetConsoleWindow
push eax
call sub.user32.dll_ShowWindow
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle_1
mov esi, eax
cmp esi, 0xffffffff
jne 0x5fab5e
lea edx, [ebp - 0x46c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.004068dc
lea eax, [ebp - 0x46c]
mov edx, 0x5faf20
call fcn.004098fc
mov ecx, dword [ebp - 0x46c]
mov dl, 1
mov eax, dword [0x5fa020]
call fcn.004287c4
mov word [ebp - 0x18], 0x1f3
mov word [ebp - 0x16], 0x32
push dword [ebp - 0x18]
push esi
call sub.kernel32.dll_SetConsoleScreenBufferSize
mov word [ebp - 0x18], 0
mov word [ebp - 0x16], 0
push dword [ebp - 0x18]
push esi
call sub.kernel32.dll_SetConsoleCursorPosition
lea eax, [ebp - 0x64]
xor ecx, ecx
mov edx, 0x44
call fcn.00405c80
mov dword [ebp - 0x64], 0x44
mov dword [ebp - 0x38], 1
mov word [ebp - 0x34], 0
lea eax, [ebp - 0x74]
xor ecx, ecx
mov edx, 0x10
call fcn.00405c80
mov eax, dword [ebp - 0xc]
push dword [eax + 8]
push 0x5faf58
mov eax, dword [ebp - 0xc]
push dword [eax + 4]
lea eax, [ebp - 4]
mov edx, 3
call fcn.004099dc
lea eax, [ebp - 4]
call fcn.00408d24
lea edx, [ebp - 8]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x18]
call fcn.00421384
cmp dword [ebp - 8], 0
jne 0x5fac02
lea edx, [ebp - 8]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.00422e74
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp - 8]
call fcn.004096e8
push eax
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004096e8
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x5fac36
call fcn.0042a3f8
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x5fac56
cmp dword [ebp - 0x10], 0x103
je 0x5fac5a
xor eax, eax
jmp 0x5fac5c
mov al, 1
mov ebx, eax
mov word [ebp - 0x18], 0
mov word [ebp - 0x16], 0
test bl, bl
je 0x5fad16
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x5fac92
cmp dword [ebp - 0x10], 0x103
je 0x5fac96
xor eax, eax
jmp 0x5fac98
mov al, 1
mov ebx, eax
test bl, bl
je 0x5fad16
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push 0x50
lea eax, [ebp - 0x45c]
push eax
push esi
call sub.kernel32.dll_ReadConsoleOutputCharacterW
lea eax, [ebp - 0x470]
lea edx, [ebp - 0x45c]
mov ecx, 0x1f4
call fcn.004097a4
mov edx, dword [ebp - 0x470]
mov ecx, 1
mov eax, 0x5faf68
call fcn.00409d34
mov edi, eax
dec edi
inc edi
jg 0x5fad16
inc word [ebp - 0x16]
cmp word [ebp - 0x16], 0x14
jle 0x5fac72
mov word [ebp - 0x16], 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_GetExitCodeProcess
test eax, eax
jne 0x5fad0c
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 2
ja 0x5fac72
cmp dword [ebp - 0x10], 0x103
jne 0x5fadb2
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push 0x50
lea eax, [ebp - 0x45c]
push eax
push esi
call sub.kernel32.dll_ReadConsoleOutputCharacterW
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x47c]
lea edx, [ebp - 0x45c]
mov ecx, 0x1f4
call fcn.004097a4
mov eax, dword [ebp - 0x47c]
mov ecx, dword [ebp - 0x14]
mov edx, 1
call fcn.00409b24
mov eax, dword [ebp - 0x478]
lea edx, [ebp - 0x474]
call fcn.00421384
mov edx, dword [ebp - 0x474]
mov eax, dword [ebp - 0xc]
call fcn.005faf6c
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
push eax
call sub.kernel32.dll_Sleep_2
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_GetExitCodeProcess
test eax, eax
je 0x5fadb2
cmp dword [ebp - 0x10], 0x103
je 0x5fad23
push 0xffffffffffffffff
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [ebp - 0xc]
add eax, 0xc
push eax
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_GetExitCodeProcess
test eax, eax
jne 0x5faddb
mov eax, dword [ebp - 0xc]
mov dword [eax + 0xc], 0x20000005
mov eax, dword [ebp - 0x74]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x70]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.005f5120
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
sub eax, dword [ecx + 0x30]
sbb edx, dword [ecx + 0x34]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x38], eax
mov dword [ecx + 0x3c], edx
mov eax, dword [ebp - 0xc]
cmp word [eax + 0x2a], 0
je 0x5fae26
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0x2c]
call dword [ebx + 0x28]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5fae42
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x20], 0
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5fae74
lea eax, [ebp - 0x47c]
mov edx, 8
call fcn.004087a8
lea eax, [ebp - 8]
mov edx, 2
call fcn.004087a8
ret