Function at 0x401040
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x403004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 8]
push ebx
push ecx
xor ebx, ebx
mov dword [ebp - 0x238], 0
push dword [eax]
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
je 0x4012ca
mov eax, dword [ebp - 8]
test eax, eax
je 0x401091
cmp eax, 6
jne 0x4012ca
mov ebx, str.load_extender_64.dll
jmp 0x40109b
mov dword [ebp - 0x238], str.load_extender_32.dll
movups xmm0, xmmword [str.Amnesia.exe]
push esi
push edi
movups xmmword [ebp - 0x250], xmm0
lea eax, [ebp - 0x230]
movq xmm0, qword [0x402204]
movq qword [ebp - 0x240], xmm0
movups xmm0, xmmword [str.Amnesia_NoSteam.exe]
push 0x228
push 0
movups xmmword [ebp - 0x278], xmm0
push eax
movups xmm0, xmmword [0x40221c]
movups xmmword [ebp - 0x268], xmm0
movq xmm0, qword [0x40222c]
movq qword [ebp - 0x258], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x234], 0x22c
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401131
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.error_when_using_CreateToolhelp32Snapshot:__d_n
call fcn.00401010
add esp, 8
jmp 0x401229
lea eax, [ebp - 0x234]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x401163
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.error_when_using_Process32First:__d_n
call fcn.00401010
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401229
mov edi, dword [sym.imp.KERNEL32.dll_Process32NextW]
nop dword [eax]
lea ecx, [ebp - 0x250]
lea eax, [ebp - 0x210]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4011a6
test dx, dx
je 0x4011a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4011a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x401180
xor eax, eax
jmp 0x4011ab
sbb eax, eax
or eax, 1
test eax, eax
je 0x401217
lea ecx, [ebp - 0x278]
lea eax, [ebp - 0x210]
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4011e6
test dx, dx
je 0x4011e2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4011e6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4011c0
xor eax, eax
jmp 0x4011eb
sbb eax, eax
or eax, 1
test eax, eax
je 0x401217
lea eax, [ebp - 0x234]
push eax
push esi
call edi
test eax, eax
jne 0x401170
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.couldnt_find_amnesia_process_n
call fcn.00401010
add esp, 4
jmp 0x401229
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x22c]
cmp eax, 0xffffffff
jne 0x401252
push str.Press_Enter_to_exit_n
call fcn.00401010
add esp, 4
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004012fb
mov esp, ebp
pop ebp
ret
push 0
push 0
push ebx
push dword [ebp - 0x238]
push 0
push 0
push eax
call dword [sym.imp.EasyHook32.dll__RhInjectLibrary_28]
test eax, eax
je 0x40129a
push eax
push str.RhInjectLibrary_failed_with_error_code___d_n
call fcn.00401010
add esp, 8
call dword [sym.imp.EasyHook32.dll__RtlGetLastErrorString_0]
push eax
push str._ls_n
call fcn.00401010
push str.Press_Enter_to_exit_n
call fcn.00401010
add esp, 0xc
jmp 0x401236
push str.Library_injected_successfully._n
call fcn.00401010
push str.Press_Enter_to_exit_n
call fcn.00401010
add esp, 8
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004012fb
mov esp, ebp
pop ebp
ret
push str.ERROR:_This_exe_wasnt_identified_as_32_bit_or_as_64_bit_n
call fcn.00401010
push str.Press_Enter_to_exit_n
call fcn.00401010
add esp, 8
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop ebx
call fcn.004012fb
mov esp, ebp
pop ebp
ret