Function at 0x10001746
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp eax, esi
je 0x1000175b
mov dword [eax], esi
mov eax, dword [ebp + 0x14]
cmp eax, esi
je 0x10001764
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
cmp eax, esi
je 0x1000176d
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10077e4c], eax
je 0x10001785
mov eax, 0x10dd
jmp 0x10001931
mov eax, dword [0x10077e50]
cmp eax, esi
jne 0x10001931
mov ecx, dword [ebp + 8]
cmp ecx, esi
jne 0x100017a1
push 6
pop eax
jmp 0x10001931
mov eax, dword [ecx]
push ebx
push edi
cmp eax, esi
jne 0x100017bc
push 6
pop eax
mov dword [0x10077e50], eax
mov dword [0x10077e54], ecx
jmp 0x1000192f
push esi
push eax
xor edi, edi
call fcn.1000136b
push edi
push dword [ebp + 0xc]
mov ebx, eax
mov dword [ebp - 8], ebx
call fcn.1000136b
mov dword [ebp + 0xc], eax
cmp eax, ebx
jne 0x100017eb
cmp dword [0x10077e48], esi
jne 0x100018ff
jmp 0x100018e3
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x100017f4
mov dword [ecx], ebx
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x100017fd
mov dword [ecx], eax
push 0x18
call fcn.10005a4f
mov esi, eax
pop ecx
test esi, esi
jne 0x10001817
mov dword [ebp - 4], 8
jmp 0x100018e3
mov eax, ebx
call fcn.10001169
mov edi, eax
test edi, edi
je 0x1000180b
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1000182d
mov dword [eax], edi
mov eax, ebx
xor ebx, ebx
jmp 0x10001836
mov eax, dword [ebp + 0x18]
and dword [ebp + 0x14], 0
lea ecx, [ebp + 0x14]
push ecx
push 0
push eax
mov dword [ebp + 0x10], eax
lea eax, [ebx + edi]
push eax
call fcn.10001a69
cmp dword [ebp + 0x14], 0
mov dword [ebp + 0x18], eax
jne 0x1000186d
push dword [ebp + 0x10]
mov ebx, eax
sub ebx, dword [ebp - 8]
call fcn.100010f3
pop ecx
test eax, eax
jne 0x1000186d
cmp ebx, 5
jl 0x10001833
cmp ebx, 5
jge 0x10001884
cmp dword [0x10077e48], 0
mov dword [ebp - 4], 9
jne 0x100018eb
jmp 0x100018e3
cmp ebx, 0x12
jbe 0x10001892
mov dword [ebp - 4], 6
jmp 0x100018e3
mov eax, dword [ebp - 8]
lea ecx, [ebx + eax]
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x1c], eax
mov dword [edi + 0x18], ecx
lea eax, [ebx + edi]
lea edx, [eax + 5]
mov byte [edi + 0x17], bl
mov byte [eax], 0xe9
inc eax
sub ecx, edx
mov dword [eax], ecx
lea ecx, [edi + 0x17]
push ecx
add eax, 4
push eax
call fcn.10001077
and dword [ebp - 0xc], 0
pop ecx
pop ecx
lea eax, [ebp - 0xc]
push eax
push 0x40
push ebx
mov ebx, dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1000190a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [0x10077e50], eax
test edi, edi
je 0x100018f4
call fcn.1000134a
test esi, esi
je 0x100018ff
push esi
call fcn.10005d99
pop ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
jmp 0x100017b1
mov eax, dword [ebp + 8]
and dword [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi + 0x10], edi
mov dword [esi + 0xc], ebx
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [0x10077e5c]
mov dword [esi], eax
mov dword [0x10077e5c], esi
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 0x14