Function at 0x1012591
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 0x10125ce
push 0x10127e4
push 1
push 0x70
call esi
push 0x100ac30
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 0x10125f5
push 0x10127b4
push 1
push 0x70
call esi
push 0x100ac30
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 0x101262a
mov eax, 0xc0000017
jmp 0x10127aa
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 0x101268e
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 0x10127aa
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 0x10126e8
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 0x1012686
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 0x1012741
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 0x10126db
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