Function at 0x1012599
Capabilities:
Map section object

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [sym.imp.ntdll.dll_DbgPrintEx]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
xor ebx, ebx
cmp dword [eax + 8], ebx
jle 0x10125d6
push 0x10127ec
push 1
push 0x70
call esi
push 0x100aa2c
push 1
push 0x70
call esi
mov eax, dword [edi + 4]
add esp, 0x18
neg dword [eax + 8]
mov eax, dword [edi + 4]
cmp dword [eax + 0x10], ebx
je 0x10125fd
push 0x10127bc
push 1
push 0x70
call esi
push 0x100aa2c
push 1
push 0x70
call esi
mov eax, dword [edi + 4]
add esp, 0x18
mov dword [eax + 0x10], ebx
mov eax, dword fs:[0x18]
mov ecx, dword [0x1038030]
push dword [edi]
mov eax, dword [eax + 0x30]
add ecx, 0x40000
push ecx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, dword [ebp + 0xc]
mov dword [esi + 0x40], eax
cmp eax, ebx
jne 0x1012632
mov eax, 0xc0000017
jmp 0x10127b2
mov ecx, dword [edi]
mov dword [esi + 0x3c], ecx
push dword [edi]
push dword [edi + 4]
push eax
call dword [sym.imp.msvcrt.dll_memmove]
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x14]
add esp, 0xc
push ebx
push 0x8000000
push 4
lea ecx, [ebp - 0x10]
push ecx
push ebx
mov dword [ebp - 0x10], eax
lea eax, [esi + 0x54]
push 0xf001f
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.ntdll.dll_NtCreateSection]
cmp eax, ebx
mov dword [ebp + 8], eax
jge 0x1012696
push dword [esi + 0x40]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp + 8]
jmp 0x10127b2
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x14]
push 4
push ebx
push 2
mov dword [ebp - 4], eax
lea eax, [esi + 0x44]
lea ecx, [ebp - 4]
push ecx
push ebx
mov dword [eax], ebx
mov ecx, dword [edi + 4]
push dword [ecx + 0x14]
mov dword [ebp - 8], eax
push ebx
push eax
mov eax, dword [ebp + 0xc]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
cmp eax, ebx
mov dword [ebp + 8], eax
jge 0x10126f0
push dword [esi + 0x40]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x101268e
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x14]
push 4
push ebx
push 2
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [edi + 4]
push ebx
push dword [ecx + 0x14]
push ebx
push eax
mov eax, dword [ebp + 0xc]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
cmp eax, ebx
mov dword [ebp + 8], eax
jge 0x1012749
push dword [esi + 0x40]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 8]
push dword [eax]
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
jmp 0x10126e3
or dword [esi + 0x4c], 0xffffffff
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push ebx
push ebx
mov dword [esi + 0x48], eax
lea eax, [esi + 0x50]
push 0x1f0001
push eax
call dword [sym.imp.ntdll.dll_NtCreateMutant]
push dword [ebp + 0x14]
push dword [esi + 0x50]
push 0xffffffffffffffff
call fcn.01003b64
mov eax, dword [edi + 8]
mov dword [esi + 0x58], eax
mov eax, dword [edi + 4]
mov ax, word [eax + 4]
mov word [esi + 8], ax
mov eax, dword [edi + 4]
mov ax, word [eax + 8]
neg ax
mov word [esi + 0xa], ax
xor eax, eax
mov word [esi + 0xc], ax
mov word [esi + 0xe], ax
mov ax, word [esi + 8]
dec ax
mov word [esi + 0x10], ax
mov ax, word [esi + 0xa]
dec ax
mov word [esi + 0x12], ax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10