Function at 0x4c88a0
Capabilities:
Enumerate process modules
Get graphical window text
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.004ca2e0
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
test edi, edi
je 0x4c8f89
cmp dword [edi], 0x3cc
jb 0x4c8f89
xor eax, eax
push 0xfe
push eax
lea ecx, [ebp - 0x3c2]
push ecx
mov word [ebp - 0x3c4], ax
call fcn.004c9b50
xor edx, edx
push 0xfe
push edx
lea eax, [ebp - 0x242]
push eax
mov word [ebp - 0x244], dx
call fcn.004c9b50
mov eax, dword [edi + 0xc]
add esp, 0x18
test eax, eax
jne 0x4c890d
mov eax, 0x4e5034
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x80
push eax
lea ecx, [ebp - 0x3c4]
push ecx
call ebx
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x4c892f
mov eax, 0x4e5034
push 0x80
push eax
lea edx, [ebp - 0x244]
push edx
call ebx
call fcn.004c6070
push 0x118
movzx ebx, al
lea eax, [ebp - 0x140]
push 0
push eax
mov dword [ebp - 0x144], 0x11c
call fcn.004c9b50
add esp, 0xc
lea ecx, [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea edx, [ebp - 0x130]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebp + eax*2 - 0x12e], 0
lea eax, [ebp + eax*2 - 0x12e]
mov dword [ebp + 8], eax
jne 0x4c899b
add eax, 2
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x40]
push ecx
mov ecx, dword [edi + 0x3c]
push edx
movzx edx, word [edi + 0x34]
push ecx
mov ecx, dword [edi + 0x20]
push eax
push edx
mov edx, dword [edi + 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x30]
push eax
mov eax, dword [edi + 0x18]
push ecx
mov ecx, dword [edi + 0x14]
push edx
push eax
push ecx
mov ecx, dword [edi + 0x1c0]
lea edx, [ebp - 0x244]
push edx
mov edx, dword [edi + 0x1bc]
lea eax, [ebp - 0x3c4]
push eax
mov eax, dword [edi + 0x1b0]
push ecx
mov ecx, dword [edi + 0x1ac]
push edx
mov edx, dword [edi + 0x1b8]
push eax
movzx eax, byte [ebp - 0x29]
push ecx
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [edi + 0x1b4]
push eax
push ecx
push edx
lea eax, [ebp - 0x130]
push eax
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
movzx ecx, word [ebp - 0x2c]
movzx edx, word [ebp - 0x2e]
push eax
movzx eax, word [ebp - 0x30]
push ecx
movzx ecx, byte [ebp - 0x2a]
push edx
mov edx, dword [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x13c]
neg ebx
push ecx
mov ecx, dword [ebp - 0x140]
sbb ebx, ebx
and ebx, 0x20
add ebx, 0x20
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push edx
push eax
push ecx
lea edx, [ebp - 0xbe4]
push str.Startup_info_r_n_tOsVer:__u._u._u.x_u__Product:__u__SP:__u._u__Suite:_0x_X__SM_SERVERR2:__u_r_n_tCSDVersion:__s__ReactOS:__u___s___Rsrv:__u_r_n_tDBCS:__u__WINE:__u__PE:__u__ACP:__u__OEMCP:__u_r_n_tDesktop:__s_r_n_tTitle:__s_r_n_tSize:__u__u__u__u_r_n_tFlags:_0x_08X__ShowWindow:__u__ConHWnd:_0x_08X_r_n_tHandles:_0x_08X__0x_08X__0x_08X
push edx
call ebx
add esp, 0x80
push 1
push 0
push 1
lea eax, [ebp - 0xbe4]
push eax
mov ecx, esi
call fcn.004c77f0
cmp dword [ebp - 4], 0
je 0x4c8b24
xor ecx, ecx
push str.kernel32.dll
mov word [ebp - 0xbe4], cx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4c8aee
push str.GetConsoleKeyboardLayoutNameW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp + 8], eax
test eax, eax
je 0x4c8aee
push 0x100
lea edx, [ebp - 0x244]
push 0
push edx
call fcn.004c9b50
add esp, 0xc
lea eax, [ebp - 0x244]
push eax
call dword [ebp + 8]
test eax, eax
je 0x4c8aee
lea ecx, [ebp - 0x244]
push ecx
lea edx, [ebp - 0xbe4]
push str.Active_console_layout_name:__s
push edx
call ebx
add esp, 0xc
cmp word [ebp - 0xbe4], 0
jne 0x4c8b10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xbe4]
push str.Active_console_layout:_Unknown__code_u
push eax
call ebx
add esp, 0xc
push 1
push 0
push 0
lea ecx, [ebp - 0xbe4]
push ecx
mov ecx, esi
call fcn.004c77f0
push 0x7c
lea edx, [ebp - 0x2c0]
push 0
push edx
mov dword [ebp - 0x2c4], 0
call fcn.004c9b50
add esp, 0xc
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
mov dword [ebp - 0x2c4], eax
lea eax, [ebp - 0xbe4]
push str.Active_HKL:_0x_08X
push eax
call ebx
add esp, 0xc
push 1
push 0
push 0
lea ecx, [ebp - 0xbe4]
push ecx
mov ecx, esi
call fcn.004c77f0
lea edx, [ebp - 0x2c4]
push edx
push 0x20
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov dword [ebp - 4], eax
test eax, eax
je 0x4c8c1a
cmp eax, 0x20
ja 0x4c8c1a
lea eax, [ebp - 0xbe4]
push str.GetKeyboardLayoutList:
push eax
call fcn.004c81b0
add esp, 8
lea ecx, [ebp - 0xbe4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ebx, ebx
mov dword [ebp + 8], eax
cmp dword [ebp - 4], ebx
jbe 0x4c8bfe
mov edx, dword [ebp + ebx*4 - 0x2c4]
mov eax, dword [ebp + 8]
push edx
lea eax, [ebp + eax*2 - 0xbe4]
push str._0x_08X
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebp + 8]
add esp, 0xc
lea eax, [ebp + eax*2 - 0xbe4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add dword [ebp + 8], eax
inc ebx
cmp ebx, dword [ebp - 4]
jb 0x4c8bc3
push 1
push 0
push 0
lea eax, [ebp - 0xbe4]
push eax
mov ecx, esi
call fcn.004c77f0
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
jmp 0x4c8c46
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xbe4]
push str.GetKeyboardLayoutList_failed__code_u
push ecx
call ebx
add esp, 0xc
push 1
push 0
push 0
lea edx, [ebp - 0xbe4]
push edx
mov ecx, esi
call fcn.004c77f0
push 0
push 0
push 0
push 0
push str.CmdLine:
mov ecx, esi
call fcn.004c87c0
mov eax, dword [edi + 0x198]
test eax, eax
jne 0x4c8c69
mov eax, str._NULL_
push 1
push 0
push 0
push eax
mov ecx, esi
call fcn.004c77f0
push 0
push 0
push 0
push 0
push str.ExecMod:
mov ecx, esi
call fcn.004c87c0
mov eax, dword [edi + 0x19c]
test eax, eax
jne 0x4c8c9a
mov eax, str._NULL_
push 1
push 0
push 0
push eax
mov ecx, esi
call fcn.004c77f0
push 0
push 0
push 0
push 0
push str.WorkDir:
mov ecx, esi
call fcn.004c87c0
mov eax, dword [edi + 0x1a0]
test eax, eax
jne 0x4c8ccb
mov eax, str._NULL_
push 1
push 0
push 0
push eax
mov ecx, esi
call fcn.004c77f0
push 0
push 0
push 0
push 0
push str.PathEnv:
mov ecx, esi
call fcn.004c87c0
mov eax, dword [edi + 0x1a4]
test eax, eax
jne 0x4c8cfc
mov eax, str._NULL_
push 1
push 0
push 0
push eax
mov ecx, esi
call fcn.004c77f0
push 0
push 0
push 0
push 0
push str.ConFont:
mov ecx, esi
call fcn.004c87c0
mov edi, dword [edi + 0x3c8]
mov eax, edi
test edi, edi
jne 0x4c8d2f
mov eax, str._NULL_
push 1
push 0
push 0
push eax
mov ecx, esi
call fcn.004c77f0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
cmp edi, eax
je 0x4c8d84
lea eax, [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowRect]
push 0x7f
lea ecx, [ebp - 0x3c4]
push ecx
push edi
call dword [sym.imp.USER32.dll_GetClassNameW]
push 0x7f
lea eax, [ebp - 0x244]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x4c8d96
xor edx, edx
xor ecx, ecx
mov word [ebp - 0x3c4], dx
mov word [ebp - 0x244], cx
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x244]
push edx
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x3c4]
push eax
mov eax, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x1c]
push edx
push eax
push ecx
push edi
lea edx, [ebp - 0xbe4]
push str.Foreground:_x_08X__i__i__i__i__s____s
push edx
call ebx
add esp, 0x24
push 1
xor edi, edi
push edi
push edi
lea eax, [ebp - 0xbe4]
push eax
mov ecx, esi
call fcn.004c77f0
lea ecx, [ebp - 0xc]
push ecx
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
push edx
push eax
lea ecx, [ebp - 0xbe4]
push str.Cursor:__i__i
push ecx
call ebx
add esp, 0x10
push 1
push edi
push edi
lea edx, [ebp - 0xbe4]
push edx
mov ecx, esi
call fcn.004c77f0
push edi
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
push 0xc
push edi
call ebx
push 0xe
push edi
mov dword [ebp - 0x28], eax
call ebx
push 0x77
push edi
mov dword [ebp - 0x24], eax
call ebx
push 0x74
push edi
mov dword [ebp - 0x20], eax
call ebx
push 0x78
push edi
mov dword [ebp - 4], eax
call ebx
push 0x26
push edi
mov dword [ebp + 8], eax
call ebx
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
push eax
mov eax, dword [ebp + 8]
push eax
push ecx
push edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push eax
push ecx
lea edx, [ebp - 0xbe4]
push str.Display:_bpp_i__planes_i__align_i__vrefr_i__shadex_08X__rastx_08X
push edx
call ebx
add esp, 0x20
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push 1
push 0
push 0
lea eax, [ebp - 0xbe4]
push eax
mov ecx, esi
call fcn.004c77f0
push 0
push 1
push 0
push 0
push str.Monitors:
mov ecx, esi
call fcn.004c87c0
push esi
push 0x4c79b0
push 0
push 0
call dword [sym.imp.USER32.dll_EnumDisplayMonitors]
push 0
push 1
push 0
push 0
push str.Modules:
mov ecx, esi
call fcn.004c87c0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
push 0x424
lea ecx, [ebp - 0x1008]
push 0
push ecx
mov edi, eax
mov dword [ebp - 0x100c], 0x428
call fcn.004c9b50
add esp, 0xc
test edi, edi
je 0x4c8f80
cmp edi, 0xffffffff
je 0x4c8f80
lea edx, [ebp - 0x100c]
push edx
push edi
call sub.KERNEL32.dll_Module32FirstW
test eax, eax
je 0x4c8f79
lea esp, [esp]
mov eax, dword [ebp - 0xff4]
test eax, eax
je 0x4c8f2f
lea ecx, [eax - 1]
jmp 0x4c8f31
xor ecx, ecx
lea edx, [ebp - 0xdec]
push edx
push eax
mov eax, dword [ebp - 0xff8]
add ecx, eax
push ecx
push eax
lea eax, [ebp - 0xbe4]
push str.___08X__08X__8X__s
push eax
call ebx
add esp, 0x18
push 1
push 0
push 0
lea ecx, [ebp - 0xbe4]
push ecx
mov ecx, esi
call fcn.004c77f0
lea edx, [ebp - 0x100c]
push edx
push edi
call sub.KERNEL32.dll_Module32NextW
test eax, eax
jne 0x4c8f20
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 1
push 0
push 1
push str.LogStartEnv_failed__invalid_apStartEnv
call fcn.004c77f0
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4