Function at 0x404136
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
push esi
push edi
xor edi, edi
xor ebx, ebx
push edi
push edi
inc ebx
push ebx
push edi
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapSetInformation]
push 4
lea eax, [esp + 0x28]
mov dword [esp + 0x28], ebx
push eax
push 0x22
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtSetInformationProcess]
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40416e
mov eax, dword [ebp + 8]
sub ecx, edx
sar ecx, 1
mov dword [0x4083c0], eax
mov dword [0x4083bc], edi
lea esi, [ecx + 1]
call fcn.00406953
test al, al
jne 0x4041ab
push 0xffffffffffffffff
call dword [sym.imp.api_ms_win_core_console_l1_2_0.dll_AttachConsole]
neg eax
sbb eax, eax
add eax, 2
mov dword [0x4083bc], eax
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x4043a7
push dword [ebp + 0x10]
mov edx, esi
mov ecx, ebx
call fcn.00401ef1
test eax, eax
js 0x4043a0
lea eax, [esp + 0x1c]
mov ecx, ebx
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x14]
push eax
lea edx, [esp + 0x24]
call fcn.00405695
test eax, eax
je 0x4043a0
mov esi, edi
call fcn.004040b1
test al, al
je 0x40422c
push 0x800
push 0
push 0x401868
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
je 0x40422a
push 0x40187c
push esi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
mov edi, eax
jmp 0x40422c
xor edi, edi
test byte [esp + 0x18], 1
je 0x40425a
push dword [esp + 0xc]
xor edx, edx
mov ecx, edi
call fcn.004040f3
test al, al
je 0x404393
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
call fcn.00403fe7
jmp 0x404393
test byte [esp + 0x18], 2
je 0x404285
push 0x401894
xor edx, edx
mov ecx, edi
call fcn.004040f3
test al, al
je 0x404393
mov ecx, dword [esp + 0xc]
call fcn.004037c3
jmp 0x404393
push 0x8001
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetErrorMode]
and dword [esp + 0x18], 0
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x10]
call fcn.00405911
mov ecx, eax
mov dword [esp + 0x2c], eax
call fcn.00405d6a
test eax, eax
je 0x404357
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x14]
and dword [esp + 0x14], 0
and dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x28]
push eax
push dword [esp + 0x30]
mov dword [esp + 0x30], eax
call fcn.00403e5b
test eax, eax
je 0x40434b
cmp dword [esp + 0x14], 0
je 0x4042f8
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x10]
call fcn.00403f6b
call fcn.00405c6c
push dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov ecx, edi
mov dword [esp + 0x10], eax
call fcn.004040f3
test al, al
je 0x404332
push dword [ebp + 0x14]
mov edx, dword [esp + 0x10]
push dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00404072
mov eax, dword [esp + 0xc]
test eax, eax
je 0x404341
push eax
call dword [sym.imp.ext_ms_win_ntuser_window_l1_1_0.dll_DestroyWindow]
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
jmp 0x404370
mov ecx, dword [0x4083c0]
mov edx, 0x403
push 0x4018bc
push dword [esp + 0x10]
call fcn.004038f0
mov edi, dword [esp + 0x2c]
cmp edi, 0xffffffff
je 0x404393
cmp dword [esp + 0x18], 0
je 0x40438c
push dword [esp + 0x18]
push 0
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_DeactivateActCtx]
push edi
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_ReleaseActCtx]
test esi, esi
je 0x40439e
push esi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
xor edi, edi
push ebx
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
cmp dword [0x4083bc], 1
jne 0x4043b6
call dword [sym.imp.api_ms_win_core_console_l1_2_0.dll_FreeConsole]
push edi
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_ExitProcess]