Function at 0x1006b520
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100b88f3
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x100e13e0]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, ecx
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov edi, edx
mov dword [esp + 0x48], eax
call fcn.1006aed0
test eax, eax
je 0x1006b6e4
mov eax, ebx
call fcn.1006af40
mov esi, eax
test esi, esi
mov dword [esp + 0x18], esi
je 0x1006b6e4
push 0x40
push 0x3000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x1006b6d3
push esi
push 0
push edi
call fcn.10072050
add esp, 0xc
push edi
call fcn.1006afa0
mov esi, dword [edi + 0x3c]
add esi, edi
add esp, 4
cmp dword [esi + 0xa0], 0
mov dword [esp + 0x24], esi
jbe 0x1006b5d8
cmp dword [esi + 0xa4], 0
jbe 0x1006b5d8
mov eax, dword [ebp + 8]
mov ebx, edi
call fcn.1006b010
lea eax, [esp + 0x2c]
push eax
mov ecx, edi
call fcn.1006b0a0
add esp, 4
test eax, eax
jne 0x1006b618
push 0x8000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea esi, [esp + 0x2c]
call fcn.1006b970
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push ecx
push 0x40
push edx
xor ebx, ebx
push edi
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1006b6fb
push 0x8000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea esi, [esp + 0x18]
lea edi, [esp + 0x2c]
call fcn.1006b9a0
mov esi, dword [eax]
mov edi, dword [eax + 4]
jmp 0x1006b660
mov ebx, dword [esp + 0x34]
lea ecx, [esp + 0x24]
call fcn.100011d7
cmp dword [esp + 0x30], ebx
ja 0x1006b679
cmp ebx, dword [esp + 0x34]
jbe 0x1006b67e
call fcn.1006f2db
test esi, esi
lea eax, [esp + 0x2c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebx
je 0x1006b694
mov ecx, eax
cmp esi, ecx
je 0x1006b699
call fcn.1006f2db
cmp edi, dword [esp + 0x28]
je 0x1006b6ca
test esi, esi
jne 0x1006b6a8
call fcn.1006f2db
cmp edi, dword [esi + 8]
jb 0x1006b6b2
call fcn.1006f2db
mov edx, dword [edi]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp edi, dword [esi + 8]
jb 0x1006b6c5
call fcn.1006f2db
add edi, 4
jmp 0x1006b660
lea eax, [esp + 0x2c]
call fcn.1006ba40
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1006b6e4
push eax
call fcn.1006f3e0
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x20
mov dword [esi + 0x34], edi
call fcn.1006f147
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, ebx
mov byte [esp + 0x48], 1
je 0x1006b726
mov esi, eax
call fcn.1006aea0
mov esi, dword [esp + 0x24]
mov dword [esp + 0x14], eax
jmp 0x1006b72c
mov dword [esp + 0x14], ebx
mov eax, ebx
cmp eax, ebx
mov byte [esp + 0x48], 0
jne 0x1006b7f3
push 0x8000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea esi, [esp + 0x18]
lea edi, [esp + 0x2c]
call fcn.1006b9a0
mov esi, dword [eax]
mov edi, dword [eax + 4]
jmp 0x1006b760
mov ebx, dword [esp + 0x34]
lea ecx, [esp + 0x24]
call fcn.100011d7
cmp dword [esp + 0x30], ebx
ja 0x1006b779
cmp ebx, dword [esp + 0x34]
jbe 0x1006b77e
call fcn.1006f2db
test esi, esi
lea eax, [esp + 0x2c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebx
je 0x1006b794
mov ecx, eax
cmp esi, ecx
je 0x1006b799
call fcn.1006f2db
cmp edi, dword [esp + 0x28]
je 0x1006b7ca
test esi, esi
jne 0x1006b7a8
call fcn.1006f2db
cmp edi, dword [esi + 8]
jb 0x1006b7b2
call fcn.1006f2db
mov edx, dword [edi]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp edi, dword [esi + 8]
jb 0x1006b7c5
call fcn.1006f2db
add edi, 4
jmp 0x1006b760
lea eax, [esp + 0x2c]
call fcn.1006ba40
lea esi, [esp + 0x2c]
call fcn.1006b970
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x18]
mov dword [eax + 4], edi
mov dword [eax + 8], ecx
mov edx, dword [esi + 0x28]
lea esi, [esp + 0x18]
lea edi, [esp + 0x2c]
mov dword [eax + 0xc], edx
call fcn.1006b9a0
mov edi, dword [eax]
mov ebx, dword [eax + 4]
jmp 0x1006b820
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x24]
call fcn.100011d7
cmp dword [esp + 0x30], esi
ja 0x1006b839
cmp esi, dword [esp + 0x34]
jbe 0x1006b83e
call fcn.1006f2db
test edi, edi
lea eax, [esp + 0x2c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
je 0x1006b854
mov ecx, eax
cmp edi, ecx
je 0x1006b859
call fcn.1006f2db
cmp ebx, dword [esp + 0x28]
je 0x1006b88d
test edi, edi
jne 0x1006b868
call fcn.1006f2db
cmp ebx, dword [edi + 8]
jb 0x1006b872
call fcn.1006f2db
mov esi, dword [esp + 0x14]
add esi, 0x10
call fcn.1006b9d0
cmp ebx, dword [edi + 8]
jb 0x1006b888
call fcn.1006f2db
add ebx, 4
jmp 0x1006b820
lea eax, [esp + 0x2c]
call fcn.1006ba40
lea esi, [esp + 0x2c]
call fcn.1006b970
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4