Function at 0x41656c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x68]
mov edx, dword [0x407d34]
call fcn.00403fbc
xor eax, eax
push ebp
push 0x4169c7
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x515040], 0
jne 0x416996
call sub.KERNEL32.dll_GetVersion
test eax, 0x80000000
je 0x416610
push 0
mov dl, 1
mov eax, dword [0x514d50]
call fcn.0040a5c8
call fcn.004116e4
push eax
push 0x416384
push 0x515030
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.00416a4c
push 0
mov dl, 1
mov eax, dword [0x514d54]
call fcn.0040a5c8
call fcn.004116e4
push eax
push 0x4163ec
push 0x515034
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.00416a4c
jmp 0x41698f
cmp byte [0x515044], 0
jne 0x41693a
mov byte [0x515044], 1
lea edx, [ebp - 0xc]
mov eax, dword [0x514e70]
call fcn.00406714
lea eax, [ebp - 0x70]
push eax
call sub.KERNEL32.dll_GetCurrentProcessId
mov cl, 0x30
mov edx, 1
call fcn.004061ac
mov ecx, dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
mov edx, dword [ebp - 0xc]
call fcn.00403804
mov eax, dword [ebp - 0x6c]
call fcn.004039b8
push eax
push 0xc
push 0
push 4
push 0
push 0xffffffffffffffff
call sub.KERNEL32.dll_CreateFileMappingA
mov esi, eax
test esi, esi
je 0x41693a
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 0x416930
mov ebx, 0x32
cmp byte [ebp - 1], 0
jne 0x4166d0
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 0x4166c2
cmp eax, dword [esp]
pop edx
pop eax
je 0x4166d0
push 0x32
call sub.KERNEL32.dll_Sleep
dec ebx
jne 0x4166a4
cmp byte [ebp - 1], 0
jne 0x4166eb
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 0xc]
cmp edx, dword [ecx + 4]
jne 0x4166e5
cmp eax, dword [ecx]
je 0x416922
push 0x40
push 0x1000
push 0xe
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [ebp - 8], eax
mov dl, 1
mov eax, dword [0x514cc4]
call fcn.0040a6d4
mov dword [ebp - 0x14], eax
mov dl, 1
mov eax, dword [0x514d58]
call fcn.0040a5c8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
mov dword [ebp - 0x28], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00417680
test eax, eax
jne 0x416745
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 0x18]
call fcn.0040a47c
mov eax, dword [ebp - 0x48]
call fcn.004043fc
test eax, eax
jl 0x416882
inc eax
xor ebx, ebx
mov edx, ebx
shl edx, 3
sub edx, ebx
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx + edx*4 + 0xc]
cmp edx, dword [ebp - 0x14]
jne 0x41687a
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [ebp - 0x48]
cmp dword [edx + eax*4 + 0x14], 0
jne 0x416799
mov edx, dword [ebp - 0x48]
cmp dword [edx + eax*4 + 0x18], 0
je 0x416882
mov edx, dword [ebp - 8]
mov dword [edi + 8], edx
mov edx, dword [ebp - 8]
mov byte [edx], 0xff
mov edx, dword [ebp - 8]
mov byte [edx + 1], 0x25
mov edx, dword [ebp - 8]
add edx, 6
mov ecx, dword [ebp - 8]
mov dword [ecx + 2], edx
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
mov dword [edx + 6], ecx
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov dword [edx + 0xa], ecx
mov edx, dword [ebp - 0x48]
cmp dword [edx + eax*4 + 0x14], 0
je 0x4167e7
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [ebp - 0x48]
mov eax, dword [edx + eax*4 + 0x14]
mov dword [ebp - 0x14], eax
jmp 0x4167f1
mov edx, dword [ebp - 0x48]
mov eax, dword [edx + eax*4 + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
call fcn.0040b814
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
je 0x416813
mov edx, 4
mov eax, dword [ebp - 0x14]
call fcn.0040b8f4
test al, al
je 0x416882
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [ebp - 0x48]
cmp byte [edx + eax*4 + 0x10], 0
je 0x416836
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 8]
sub ecx, dword [edx + eax*4 + 4]
sub ecx, 5
mov dword [ebp - 0x10], ecx
jmp 0x41683f
mov eax, dword [ebp - 8]
add eax, 0xa
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
mov ecx, 4
mov edx, dword [ebp - 0x14]
call fcn.004107c8
test al, al
jne 0x41685b
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
cmp byte [ebp - 0x19], 0
je 0x41686e
mov edx, 4
mov eax, dword [ebp - 0x14]
call fcn.0040b984
mov eax, dword [ebp - 8]
mov dword [0x515048], eax
xor esi, esi
jmp 0x416882
inc ebx
dec eax
jne 0x416763
cmp dword [ebp - 0x24], 0
jne 0x41688c
cmp dword [ebp - 0x28], 0
je 0x4168f2
mov eax, dword [ebp - 0x18]
call fcn.0040b814
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
je 0x4168b0
mov edx, 8
mov eax, dword [ebp - 0x18]
call fcn.0040b8f4
test al, al
je 0x4168f2
lea eax, [ebp - 0x28]
mov ecx, 8
mov edx, dword [ebp - 0x18]
call fcn.004107c8
test al, al
jne 0x4168d2
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
mov dword [eax], edx
mov edx, dword [ebp - 0x24]
mov dword [eax + 4], edx
mov edx, 8
mov eax, dword [ebp - 0x18]
call fcn.00415494
cmp byte [ebp - 0x19], 0
je 0x4168f2
mov edx, 8
mov eax, dword [ebp - 0x18]
call fcn.0040b984
cmp dword [0x515048], 0
jne 0x416913
push edi
call sub.KERNEL32.dll_UnmapViewOfFile
push 0x8000
push 0
mov eax, dword [ebp - 8]
push eax
call sub.KERNEL32.dll_VirtualFree
jmp 0x416930
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
mov dword [edi], edx
mov edx, dword [eax + 4]
mov dword [edi + 4], edx
jmp 0x416930
mov eax, dword [edi + 8]
mov dword [0x515048], eax
push edi
call sub.KERNEL32.dll_UnmapViewOfFile
test esi, esi
je 0x41693a
push esi
call sub.KERNEL32.dll_CloseHandle
cmp dword [0x515048], 0
je 0x416964
push 0
mov eax, dword [0x515048]
push eax
push 0x4164e4
push 0x51503c
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.00416a4c
jmp 0x41698f
push 0
mov dl, 1
mov eax, dword [0x514d58]
call fcn.0040a5c8
call fcn.004116e4
push eax
push 0x416468
push 0x515038
push 0
xor ecx, ecx
xor edx, edx
xor eax, eax
call fcn.00416a4c
mov byte [0x515040], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4169ce
lea eax, [ebp - 0x70]
mov edx, 2
call fcn.0040354c
lea eax, [ebp - 0x68]
mov edx, dword [0x407d34]
call fcn.00404080
lea eax, [ebp - 0xc]
call fcn.00403528
ret