Function at 0x4166f4
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x58]
mov edx, dword [0x40b174]
call fcn.0040402c
xor eax, eax
push ebp
push 0x416a83
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x41f124], 0
jne 0x416a52
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
je 0x416798
push 0
mov dl, 1
mov eax, dword [0x41ee34]
call fcn.0040d994
call fcn.00411978
push eax
push 0x41650c
push 0x41f114
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.0041708c
push 0
mov dl, 1
mov eax, dword [0x41ee38]
call fcn.0040d994
call fcn.00411978
push eax
push 0x416574
push 0x41f118
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.0041708c
jmp 0x416a4b
cmp byte [0x41f128], 0
jne 0x4169f6
mov byte [0x41f128], 1
lea edx, [ebp - 0xc]
mov eax, dword [0x41ef48]
call fcn.00409eac
lea eax, [ebp - 0x60]
push eax
call sub.kernel32.dll_GetCurrentProcessId
mov cl, 0x30
mov edx, 1
call fcn.00409b54
mov ecx, dword [ebp - 0x60]
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0xc]
call fcn.00403ccc
mov eax, dword [ebp - 0x5c]
call fcn.00403e78
push eax
push 0xc
push 0
push 4
push 0
push 0xffffffffffffffff
call sub.kernel32.dll_CreateFileMappingA
mov esi, eax
test esi, esi
je 0x4169f6
call sub.kernel32.dll_GetLastError
cmp eax, 0xb7
setne byte [ebp - 1]
push 0
push 0
push 0
push 0xf001f
push esi
call sub.kernel32.dll_MapViewOfFile
mov edi, eax
test edi, edi
je 0x4169ec
mov ebx, 0x32
cmp byte [ebp - 1], 0
jne 0x416858
mov eax, dword [edi]
mov edx, dword [edi + 4]
push edx
push eax
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 4]
mov eax, dword [eax]
cmp edx, dword [esp + 4]
jne 0x41684a
cmp eax, dword [esp]
pop edx
pop eax
je 0x416858
push 0x32
call sub.kernel32.dll_Sleep
dec ebx
jne 0x41682c
cmp byte [ebp - 1], 0
jne 0x416873
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 0xc]
cmp edx, dword [ecx + 4]
jne 0x41686d
cmp eax, dword [ecx]
je 0x4169de
push 0x40
push 0x1000
push 0xa
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 8], eax
mov dl, 1
mov eax, dword [0x41edbc]
call fcn.0040da7c
mov dword [ebp - 0x14], eax
mov dl, 1
mov eax, dword [0x41ee3c]
call fcn.0040d994
lea edx, [ebp - 0x58]
call fcn.0040d8e0
mov eax, dword [ebp - 0x38]
call fcn.00404654
test eax, eax
jl 0x4169ae
inc eax
xor ebx, ebx
mov edx, ebx
shl edx, 3
sub edx, ebx
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + edx*4 + 0xc]
cmp edx, dword [ebp - 0x14]
jne 0x4169a6
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [ebp - 0x38]
cmp dword [edx + eax*4 + 0x14], 0
je 0x4169ae
mov eax, dword [ebp - 8]
mov dword [edi + 8], eax
mov eax, dword [ebp - 8]
mov byte [eax], 0xff
mov eax, dword [ebp - 8]
mov byte [eax + 1], 0x25
mov eax, dword [ebp - 8]
add eax, 6
mov edx, dword [ebp - 8]
mov dword [edx + 2], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
mov dword [eax + 6], edx
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + eax*4 + 0x14]
call fcn.0040eb40
mov byte [ebp - 0x15], al
cmp byte [ebp - 0x15], 0
je 0x416948
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + eax*4 + 0x14]
mov edx, 4
call fcn.0040ec20
test al, al
je 0x4169ae
mov esi, ebx
shl esi, 3
sub esi, ebx
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 8]
sub edx, dword [eax + esi*4 + 4]
sub edx, 5
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + esi*4 + 0x14]
lea eax, [ebp - 0x10]
mov ecx, 4
call fcn.00410f64
test al, al
jne 0x416983
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + esi*4 + 0x14]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
cmp byte [ebp - 0x15], 0
je 0x41699a
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + esi*4 + 0x14]
mov edx, 4
call fcn.0040ecb0
mov eax, dword [ebp - 8]
mov dword [0x41f12c], eax
xor esi, esi
jmp 0x4169ae
inc ebx
dec eax
jne 0x4168bc
cmp dword [0x41f12c], 0
jne 0x4169cf
push edi
call sub.kernel32.dll_UnmapViewOfFile
push 0x8000
push 0
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_VirtualFree_1
jmp 0x4169ec
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
mov dword [edi], edx
mov edx, dword [eax + 4]
mov dword [edi + 4], edx
jmp 0x4169ec
mov eax, dword [edi + 8]
mov dword [0x41f12c], eax
push edi
call sub.kernel32.dll_UnmapViewOfFile
test esi, esi
je 0x4169f6
push esi
call sub.kernel32.dll_CloseHandle
cmp dword [0x41f12c], 0
je 0x416a20
push 0
mov eax, dword [0x41f12c]
push eax
push 0x41666c
push 0x41f120
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.0041708c
jmp 0x416a4b
push 0
mov dl, 1
mov eax, dword [0x41ee3c]
call fcn.0040d994
call fcn.00411978
push eax
push 0x4165f0
push 0x41f11c
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.0041708c
mov byte [0x41f124], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x416a8a
lea eax, [ebp - 0x60]
mov edx, 2
call fcn.00403a34
lea eax, [ebp - 0x58]
mov edx, dword [0x40b174]
call fcn.004040f0
lea eax, [ebp - 0xc]
call fcn.00403a10
ret