Function at 0x100039d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x1001f004]
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 [0x10020244], eax
je 0x10003a09
pop edi
mov eax, 0x10dd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100073c8
mov esp, ebp
pop ebp
ret
mov eax, dword [0x10020240]
test eax, eax
jne 0x10003bda
test edi, edi
jne 0x10003a2d
lea eax, [edi + 0x57]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100073c8
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x10003a46
cmp dword [ebx], 0
jne 0x10003a5b
mov dword [0x10020240], 6
mov dword [0x1002024c], ebx
pop edi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100073c8
mov esp, ebp
pop ebp
ret
push esi
push 0x18
call fcn.100073e4
mov esi, dword [ebx]
add esp, 4
mov dword [ebp - 0x10], eax
test esi, esi
je 0x10003ad3
cmp byte [esi], 0xff
jne 0x10003a92
cmp byte [esi + 1], 0x25
jne 0x10003a92
mov eax, dword [esi + 2]
mov ecx, esi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.10002950
test al, al
je 0x10003a92
mov esi, dword [ebp - 0xc]
mov esi, dword [esi]
cmp byte [esi], 0xeb
jne 0x10003ad3
movsx eax, byte [esi + 1]
add eax, 2
add esi, eax
mov cl, byte [esi]
lea eax, [esi + 1]
cmp cl, 0xff
jne 0x10003ac9
cmp byte [eax], 0x25
jne 0x10003ac9
mov eax, dword [esi + 2]
mov ecx, esi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.10002950
test al, al
je 0x10003ad3
mov esi, dword [ebp - 0xc]
mov esi, dword [esi]
jmp 0x10003ad3
cmp cl, 0xe9
jne 0x10003ad3
add esi, 5
add esi, dword [eax]
cmp byte [edi], 0xff
jne 0x10003af6
cmp byte [edi + 1], 0x25
jne 0x10003af6
mov eax, dword [edi + 2]
mov ecx, edi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.10002950
test al, al
je 0x10003af6
mov edi, dword [ebp - 0xc]
mov edi, dword [edi]
cmp byte [edi], 0xeb
jne 0x10003b37
movsx eax, byte [edi + 1]
add eax, 2
add edi, eax
mov cl, byte [edi]
lea eax, [edi + 1]
cmp cl, 0xff
jne 0x10003b2d
cmp byte [eax], 0x25
jne 0x10003b2d
mov eax, dword [edi + 2]
mov ecx, edi
mov edx, eax
mov dword [ebp - 0xc], eax
call fcn.10002950
test al, al
je 0x10003b37
mov edi, dword [ebp - 0xc]
mov edi, dword [edi]
jmp 0x10003b37
cmp cl, 0xe9
jne 0x10003b37
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 0x10003bb0
cmp eax, 0x1e
ja 0x10003bb0
cmp dword [esi + 0x44], edi
jne 0x10003bb0
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 0x10003b74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10003bbe
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 [0x10020258]
pop edi
mov dword [ecx], eax
xor eax, eax
mov dword [0x10020258], ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100073c8
mov esp, ebp
pop ebp
ret
cmp dword [0x10020228], 0
mov esi, 9
jne 0x10003bc4
mov dword [0x10020240], esi
push 0x18
push dword [ebp - 0x10]
call fcn.10007414
add esp, 8
mov dword [0x1002024c], ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.100073c8
mov esp, ebp
pop ebp
ret