Function at 0xf017799
Capabilities:
Allocate or change rwx memory
Map section object

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
movzx ecx, word [ebp + 8]
mov edx, dword [ebp + 0xc]
and dword [ebp - 4], 0
sub ecx, 0xfffa
mov eax, dword [edx]
push ebx
push esi
mov esi, dword [0xf09aef8]
push edi
je 0xf017a12
dec ecx
je 0xf0179dc
dec ecx
je 0xf017946
dec ecx
je 0xf017936
dec ecx
je 0xf01787d
dec ecx
je 0xf0177f3
push 0x1e7
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0xf017a1e
test esi, esi
je 0xf0179ce
mov edi, dword [ebp + 0x10]
cmp word [esi + 8], 0xfffe
jne 0xf017811
cmp dword [esi], eax
jne 0xf017811
mov ecx, dword [esi + 4]
cmp ecx, dword [edi]
je 0xf017818
mov esi, dword [esi + 0x10]
test esi, esi
jne 0xf0177fe
test esi, esi
je 0xf0179ce
push dword [esi]
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
test eax, eax
jl 0xf017a0d
mov ecx, dword [esi]
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov ecx, dword [esi]
push 0x40
push 0x40000000
sub ecx, 0xc0000
push 2
mov dword [ebp - 8], ecx
mov ecx, dword [esi + 4]
push edi
mov dword [edi], ecx
lea ecx, [ebp - 8]
push ecx
push 0
push 0
push eax
push 0xffffffffffffffff
push dword [0xf09aef4]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
test eax, eax
jl 0xf0179ce
or word [esi + 8], 0xffff
jmp 0xf017a0d
test esi, esi
je 0xf0179ce
mov ecx, dword [ebp + 0x10]
cmp word [esi + 8], 0xffff
jne 0xf0178a3
mov edx, dword [ecx]
mov edi, dword [esi]
add edx, eax
cmp edi, edx
ja 0xf0178a3
mov ebx, dword [esi + 4]
add ebx, edi
cmp ebx, edx
jae 0xf0178aa
mov esi, dword [esi + 0x10]
test esi, esi
jne 0xf017888
test esi, esi
je 0xf0179ce
push 0xfffe
push dword [ecx]
push eax
push esi
call fcn.0f03cffc
mov esi, eax
test esi, esi
je 0xf0177ec
mov eax, dword [esi]
push 0x40
push 0x40000000
push 2
sub eax, 0xc0000
mov dword [ebp - 8], eax
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 8]
push ecx
push dword [eax]
push 0
push esi
push 0xffffffffffffffff
push dword [0xf09aef4]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
test eax, eax
jl 0xf0179ce
mov word [esi + 8], 0xfffe
jmp 0xf017a0d
cmp word [esi + 8], 0xffff
jne 0xf017933
push 0x40
push 0x1000
lea eax, [esi + 4]
push eax
push 0
push esi
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
jl 0xf01793f
mov word [esi + 8], 0xfffd
mov esi, dword [esi + 0x10]
test esi, esi
jne 0xf01790b
jmp 0xf017a0d
push 0xe
jmp 0xf0177e6
test esi, esi
je 0xf01793f
mov ebx, dword [ebp + 0x10]
cmp word [esi + 8], 0xffff
jne 0xf017970
mov edx, dword [esi + 4]
mov edi, dword [ebx]
cmp edx, edi
jb 0xf017970
test eax, eax
je 0xf017977
mov ecx, dword [esi]
cmp eax, ecx
jb 0xf017970
add edx, ecx
add edi, eax
cmp edi, edx
jbe 0xf017977
mov esi, dword [esi + 0x10]
test esi, esi
jne 0xf01794d
xor edi, edi
cmp esi, edi
je 0xf01793f
cmp eax, edi
jne 0xf017983
mov eax, dword [esi]
push 0xfffc
push dword [ebx]
push eax
push esi
call fcn.0f03cffc
mov esi, eax
cmp esi, edi
je 0xf0177ec
push 0x40
push 0x40000000
mov dword [ebp - 4], edi
mov eax, dword [esi]
push 2
sub eax, 0xc0000
mov dword [ebp - 8], eax
lea eax, [esi + 4]
push eax
lea eax, [ebp - 8]
push eax
push edi
push edi
push esi
push 0xffffffffffffffff
push dword [0xf09aef4]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
test eax, eax
jge 0xf0179d5
push 5
jmp 0xf0177e6
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
jmp 0xf017a0b
test esi, esi
je 0xf0177ec
cmp word [esi + 8], 0xfffd
je 0xf0179f3
mov esi, dword [esi + 0x10]
test esi, esi
jne 0xf0179e4
test esi, esi
je 0xf0177ec
mov eax, dword [esi]
mov ecx, dword [ebp + 0x10]
mov word [esi + 8], 0xfffb
mov dword [edx], eax
mov eax, dword [esi + 4]
mov dword [ecx], eax
xor eax, eax
inc eax
jmp 0xf017a1e
mov ecx, dword [ebp + 0x10]
push esi
push dword [ecx]
push eax
call fcn.0f03d151
pop edi
pop esi
pop ebx
leave
ret 0xc