Function at 0x1000473b
Capabilities:
Allocate or change rwx memory

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0xc
push edi
xor edi, edi
test eax, eax
je 0x1000474b
mov dword [eax], edi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10004755
mov dword [eax], edi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1000475f
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x100300b4], eax
je 0x10004777
mov eax, 0x10dd
jmp 0x1000498a
mov eax, dword [0x100300b8]
test eax, eax
jne 0x1000498a
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10004794
push 6
pop eax
jmp 0x1000498a
mov ecx, dword [eax]
push ebx
push ebp
push esi
test ecx, ecx
jne 0x100047ab
push 6
pop edi
mov dword [0x100300b8], edi
jmp 0x10004946
push edi
push ecx
mov ebp, edi
mov ebx, edi
call fcn.100046aa
push edi
push dword [esp + 0x30]
mov esi, eax
mov dword [esp + 0x20], esi
call fcn.100046aa
mov ecx, eax
add esp, 0x10
mov dword [esp + 0x18], ecx
cmp ecx, esi
jne 0x100047e4
cmp dword [0x100300b0], ebx
jne 0x10004942
jmp 0x10004926
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x100047ee
mov dword [eax], esi
mov eax, dword [esp + 0x30]
test eax, eax
je 0x100047f8
mov dword [eax], ecx
push 0x18
call fcn.1000617c
mov ebx, eax
mov dword [esp + 0x28], ebx
pop ecx
test ebx, ebx
jne 0x10004812
push 8
pop edi
jmp 0x10004926
call sub.detoured.dll_Detoured
push esi
call fcn.1000431a
mov ebp, eax
pop ecx
test ebp, ebp
je 0x1000480a
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1000482e
mov dword [eax], ebp
mov ebx, edi
mov eax, esi
mov dword [esp + 0x2c], ebx
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c], eax
push ecx
push edi
push eax
lea eax, [ebx + ebp]
mov dword [esp + 0x3c], edi
push eax
call fcn.10005d9c
mov dword [esp + 0x28], eax
cmp dword [esp + 0x30], edi
jne 0x10004873
push dword [esp + 0x2c]
mov ebx, eax
sub ebx, esi
call fcn.100044f6
pop ecx
test eax, eax
jne 0x10004873
mov eax, dword [esp + 0x28]
cmp ebx, 5
jl 0x10004836
mov dword [esp + 0x2c], ebx
cmp ebx, 5
mov ebx, dword [esp + 0x24]
jge 0x10004895
cmp dword [0x100300b0], 0
push 9
pop edi
jne 0x1000492c
jmp 0x10004926
mov eax, dword [esp + 0x2c]
cmp eax, 0x12
jbe 0x100048a5
push 6
jmp 0x1000480c
mov ecx, dword [esp + 0x18]
lea edx, [ebp + 0x17]
mov dword [ebp + 0x1c], ecx
add esi, eax
lea ecx, [eax + ebp]
mov byte [edx], al
mov dword [ebp + 0x18], esi
lea eax, [ecx + 5]
sub esi, eax
mov byte [ecx], 0xe9
push edx
lea eax, [ecx + 5]
mov dword [ecx + 1], esi
push eax
call fcn.100045cf
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x1c]
pop ecx
pop ecx
push eax
push 0x40
push dword [esp + 0x34]
mov dword [esp + 0x20], edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1000491e
push esi
call fcn.10004545
mov esi, eax
pop ecx
test esi, esi
je 0x1000495d
mov eax, 0x6544
cmp word [esi + 0x1c], ax
je 0x1000495d
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], edi
push eax
push 0x40
push 0x40
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1000494f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [0x100300b8], edi
test ebp, ebp
je 0x10004937
push ebp
call fcn.100045a8
pop ecx
test ebx, ebx
je 0x10004942
push ebx
call fcn.100061f2
pop ecx
mov eax, dword [esp + 0x20]
mov dword [0x100300bc], eax
mov eax, edi
jmp 0x10004987
mov dword [esi + 0x1c], 0x6f746544
mov dword [esi + 0x20], 0x21737275
mov eax, dword [esp + 0x20]
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x10]
mov dword [ebx + 0xc], eax
mov dword [ebx + 4], edi
mov dword [ebx + 0x10], ebp
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x14], eax
mov eax, dword [0x100300c4]
mov dword [ebx], eax
xor eax, eax
mov dword [0x100300c4], ebx
pop esi
pop ebp
pop ebx
pop edi
add esp, 0xc
ret 0x14