Function at 0x412500
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x542040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, edx
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x549d08], eax
je 0x412539
pop edi
mov eax, 0x10dd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dadd7
mov esp, ebp
pop ebp
ret
mov eax, dword [0x549bbc]
test eax, eax
jne 0x41270a
test edi, edi
jne 0x41255d
lea eax, [edi + 0x57]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dadd7
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x412576
cmp dword [ebx], 0
jne 0x41258b
mov dword [0x549bbc], 6
mov dword [0x549d10], ebx
pop edi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dadd7
mov esp, ebp
pop ebp
ret
push esi
push 0x18
call fcn.004db155
mov esi, dword [ebx]
add esp, 4
mov dword [ebp - 0x10], eax
test esi, esi
je 0x412603
cmp byte [esi], 0xff
jne 0x4125c2
cmp byte [esi + 1], 0x25
jne 0x4125c2
mov eax, dword [esi + 2]
mov ecx, esi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.00411540
test al, al
je 0x4125c2
mov esi, dword [ebp - 0xc]
mov esi, dword [esi]
cmp byte [esi], 0xeb
jne 0x412603
movsx eax, byte [esi + 1]
add eax, 2
add esi, eax
mov cl, byte [esi]
lea eax, [esi + 1]
cmp cl, 0xff
jne 0x4125f9
cmp byte [eax], 0x25
jne 0x4125f9
mov eax, dword [esi + 2]
mov ecx, esi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.00411540
test al, al
je 0x412603
mov esi, dword [ebp - 0xc]
mov esi, dword [esi]
jmp 0x412603
cmp cl, 0xe9
jne 0x412603
add esi, 5
add esi, dword [eax]
cmp byte [edi], 0xff
jne 0x412626
cmp byte [edi + 1], 0x25
jne 0x412626
mov eax, dword [edi + 2]
mov ecx, edi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.00411540
test al, al
je 0x412626
mov edi, dword [ebp - 0xc]
mov edi, dword [edi]
cmp byte [edi], 0xeb
jne 0x412667
movsx eax, byte [edi + 1]
add eax, 2
add edi, eax
mov cl, byte [edi]
lea eax, [edi + 1]
cmp cl, 0xff
jne 0x41265d
cmp byte [eax], 0x25
jne 0x41265d
mov eax, dword [edi + 2]
mov ecx, edi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.00411540
test al, al
je 0x412667
mov edi, dword [ebp - 0xc]
mov edi, dword [edi]
jmp 0x412667
cmp cl, 0xe9
jne 0x412667
add edi, 5
add edi, dword [eax]
movzx eax, byte [esi + 0x36]
mov ecx, dword [esi + 0x40]
sub ecx, eax
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x4126e0
cmp eax, 0x1e
ja 0x4126e0
cmp dword [esi + 0x44], edi
jne 0x4126e0
lea edx, [ebp - 8]
mov dword [ebp - 8], 0
push edx
push 0x40
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4126a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4126ee
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [ecx + 0xc], eax
mov dword [ecx + 8], ebx
mov dword [ecx + 0x10], esi
mov dword [ecx + 4], 1
mov eax, dword [ebp - 8]
pop esi
mov dword [ecx + 0x14], eax
mov eax, dword [0x549d1c]
pop edi
mov dword [ecx], eax
xor eax, eax
mov dword [0x549d1c], ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dadd7
mov esp, ebp
pop ebp
ret
cmp dword [0x547e90], 0
mov esi, 9
jne 0x4126f4
mov dword [0x549bbc], esi
push 0x18
push dword [ebp - 0x10]
call fcn.004dadea
add esp, 8
mov dword [0x549d10], ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004dadd7
mov esp, ebp
pop ebp
ret