Function at 0x140004140
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x360
mov rax, qword [0x140016058]
xor rax, rsp
mov qword [rsp + 0x350], rax
mov rdi, rcx
mov dword [rsp + 0x38], r8d
mov qword [rsp + 0x48], rdx
mov esi, 0x170
lea rcx, [rsp + 0x1e0]
xor edx, edx
mov r8, rsi
xor ebx, ebx
call fcn.1400055e0
mov rcx, rdi
mov dword [rsp + 0x1e0], esi
call fcn.140003d10
lea ebp, [rbx + 0x40]
lea rcx, [rsp + 0x1a0]
mov r8, rbp
xor edx, edx
mov rsi, rax
call fcn.1400055e0
lea r8, [rsp + 0x1a0]
mov r9, rbp
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, ebx
je 0x1400048ad
lea rdx, [rsp + 0x1a0]
lea rcx, [rsp + 0x204]
mov r8, rbp
call fcn.1400056e0
mov eax, 0x5a4d
mov qword [rsp + 0x1e8], rsi
cmp word [rsp + 0x1a0], ax
jne 0x1400048ad
mov ebp, 0x108
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8, rbp
call fcn.1400055e0
movsxd rdx, dword [rsp + 0x1dc]
lea r8, [rsp + 0x60]
add rdx, rsi
mov r9, rbp
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, ebx
je 0x1400048ad
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x244]
mov r8, rbp
call fcn.1400056e0
cmp dword [rsp + 0x60], 0x4550
movsxd r11, dword [rsp + 0x1dc]
lea rax, [rsi + r11]
mov qword [rsp + 0x1f0], rax
jne 0x1400048ad
cmp dword [rsp + 0xf0], ebx
je 0x1400048ad
movzx eax, word [rsp + 0x74]
mov dword [rsp + 0x140], ebx
mov dword [rsp + 0x144], ebx
mov ebp, ebx
mov r12d, ebx
lea r15d, [rbx + 1]
lea ecx, [rax + r11 + 0x18]
cmp bx, word [rsp + 0x66]
jae 0x14000435c
mov r13d, ecx
lea r14d, [rbx + 0x28]
lea rcx, [rsp + 0x170]
mov r8, r14
xor edx, edx
call fcn.1400055e0
mov r11d, r12d
lea r8, [rsp + 0x170]
lea rax, [r11 + r11*4]
mov r9, r14
mov rcx, rdi
lea rdx, [r13 + rax*8]
mov qword [rsp + 0x20], rbx
add rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, ebx
je 0x1400048ad
mov edx, dword [rsp + 0x180]
cmp dword [rsp + 0x148], ebx
jne 0x14000433d
mov ecx, dword [rsp + 0x17c]
cmp dword [rsp + 0xf0], ecx
jb 0x14000433d
lea eax, [rdx + rcx]
cmp dword [rsp + 0xf0], eax
jae 0x14000433d
mov dword [rsp + 0x148], ecx
mov dword [rsp + 0x14c], edx
mov ecx, dword [rsp + 0x184]
movzx eax, word [rsp + 0x66]
add ecx, edx
cmp ebp, ecx
cmovb ebp, ecx
add r12d, r15d
cmp r12d, eax
jb 0x1400042c1
lea r8, [rsp + 0x60]
mov rdx, rsi
mov rcx, rdi
call fcn.140003ab0
mov ecx, dword [rsp + 0xf4]
mov word [rsp + 0x44], ax
mov eax, dword [rsp + 0x38]
lea r14d, [rax + rax*4]
mov r15d, eax
shl r14d, 2
shl r15d, 5
lea r13d, [rcx + r14 + 7]
and r13d, 0xfffffff8
add r15d, r13d
mov ecx, r15d
mov dword [rsp + 0x3c], r15d
mov dword [rsp + 0x34], ecx
cmp eax, ebx
jbe 0x1400043dc
mov rbp, qword [rsp + 0x48]
mov r12, rax
mov r15d, ecx
mov rcx, qword [rbp]
call fcn.140005a30
add rbp, 8
add eax, 4
and eax, 0xfffffffc
add r15d, eax
sub r12, 1
jne 0x1400043b2
mov dword [rsp + 0x34], r15d
mov r15d, dword [rsp + 0x3c]
mov ecx, dword [rsp + 0x34]
mov ebp, ecx
call fcn.140004f90
mov r12, rax
cmp rax, rbx
je 0x1400048ad
mov r8, rbp
xor edx, edx
mov rcx, rax
call fcn.1400055e0
mov ecx, dword [rsp + 0x80]
mov edx, dword [rsp + 0x84]
mov r8d, dword [rsp + 0x8c]
add rdx, rcx
mov ecx, dword [rsp + 0x7c]
add rcx, rsi
add rcx, rdx
mov rdx, rsi
add r8, rcx
mov rcx, rdi
cmp rsi, r8
cmovb rdx, r8
mov r8d, dword [rsp + 0x34]
call fcn.140003c10
mov rbp, rax
mov qword [rsp + 0x58], rax
cmp rax, rbx
je 0x1400048a5
mov edx, dword [rsp + 0xf0]
mov r8d, dword [rsp + 0xf4]
lea rax, [rsp + 0x30]
add rdx, rsi
mov r9d, 0x40
mov rcx, rdi
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x200], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp eax, ebx
je 0x1400048a5
mov eax, dword [rsp + 0x30]
mov edx, dword [rsp + 0xf0]
mov r9d, dword [rsp + 0xf4]
mov dword [rsp + 0x200], eax
mov eax, ebp
mov r8d, r14d
sub eax, esi
add rdx, rsi
mov rcx, rdi
add r8, r12
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, ebx
je 0x1400048a5
mov ebp, dword [rsp + 0x38]
mov dword [rsp + 0x3c], ebx
movsxd rax, r13d
mov r14d, 0x14
cmp ebp, ebx
jbe 0x1400048da
mov r11d, dword [rsp + 0x40]
lea r14, [r12 + 4]
lea ecx, [r11 + r13]
mov r13d, dword [rsp + 0x34]
mov dword [rsp + 0x38], ecx
lea rcx, [rax + r12 + 8]
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rcx
mov r8, qword [rax]
mov edx, r13d
mov ecx, r15d
sub edx, r15d
add rcx, r12
cmp rdx, rbx
je 0x1400048a5
cmp rdx, 0x7fffffff
ja 0x1400048a5
mov r10d, 0x7ffffffe
mov r9d, ebx
mov r13d, 1
sub r10, rdx
sub r8, rcx
lea rax, [rdx + r10]
cmp rax, rbx
je 0x14000455d
mov al, byte [rcx + r8]
cmp al, bl
je 0x14000455d
mov byte [rcx], al
add rcx, r13
sub rdx, r13
jne 0x140004542
mov r13d, dword [rsp + 0x34]
cmp rdx, rbx
jne 0x140004570
dec rcx
mov r9d, 0x8007007a
cmp r9d, ebx
mov byte [rcx], bl
jl 0x1400048a5
mov rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x38]
movabs rdx, 0x8000000000000001
mov dword [r14 - 4], eax
mov qword [rcx - 8], rdx
mov qword [rcx], rbx
add eax, 0x10
mov dword [r14 + 0xc], eax
mov qword [rcx + 8], rdx
mov qword [rcx + 0x10], rbx
mov rcx, qword [rsp + 0x48]
lea eax, [r11 + r15]
mov dword [r14], ebx
mov dword [r14 + 4], ebx
mov dword [r14 + 8], eax
mov rcx, qword [rcx]
call fcn.140005a30
mov r9d, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x50]
add dword [rsp + 0x38], 0x20
mov r11d, dword [rsp + 0x40]
add eax, 4
and eax, 0xfffffffc
add rcx, 0x20
mov r10d, 1
add r15d, eax
mov rax, qword [rsp + 0x48]
add r9d, r10d
add rax, 8
add r14, 0x14
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x3c], r9d
cmp r9d, ebp
jb 0x140004508
lea r14d, [r10 + 0x13]
mov ecx, dword [rsp + 0xf4]
movabs rax, 0xcccccccccccccccd
mov r8d, ebx
mul rcx
shr rdx, 4
add rdx, rbp
je 0x140004651
mov rcx, r12
cmp dword [rcx], ebx
jne 0x140004643
cmp dword [rcx + 0x10], ebx
je 0x140004651
add r8d, r10d
add rcx, r14
mov eax, r8d
cmp rax, rdx
jb 0x14000463a
mov rdx, qword [rsp + 0x58]
mov r9d, r15d
mov r8, r12
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp eax, ebx
je 0x1400048a5
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0xf4], r13d
mov dword [rsp + 0xf0], eax
cmp dword [rsp + 0x158], ebx
je 0x140004762
cmp dword [rsp + 0x15c], ebx
je 0x140004762
mov ebp, dword [rsp + 0x158]
lea r8, [rsp + 0x170]
mov r9, r14
add rbp, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rbx
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp eax, ebx
je 0x1400048a5
lea rax, [rbp + 0x10]
mov r9d, 4
mov r8, r14
mov qword [rsp + 0x1f8], rax
mov eax, dword [rsp + 0x180]
mov rdx, rbp
mov dword [rsp + 0x34c], eax
and eax, 0xfffffffe
mov rcx, rdi
mov dword [rsp + 0x180], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp eax, ebx
je 0x1400048a5
lea r8, [rsp + 0x170]
mov r9, r14
mov rdx, rbp
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp eax, ebx
je 0x1400048a5
mov r9d, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov r8, r14
mov rdx, rbp
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp eax, ebx
je 0x1400048a5
mov r8d, dword [rsp + 0xb4]
lea rax, [rsp + 0x30]
mov r13d, 0x40
mov r9d, r13d
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp eax, ebx
je 0x1400048a5
lea r8, [rsp + 0x1a0]
mov r9, r13
mov rdx, rsi
mov rcx, rdi
mov word [rsp + 0x1bc], bx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp eax, ebx
je 0x1400048a5
movsxd rdx, dword [rsp + 0x1dc]
lea r8, [rsp + 0x60]
mov r9d, 0x108
mov rcx, rdi
add rdx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp eax, ebx
je 0x1400048a5
lea r8, [rsp + 0x60]
mov rdx, rsi
mov rcx, rdi
call fcn.140003ab0
movzx ebp, word [rsp + 0x44]
lea r8, [rsp + 0x1a0]
cmp ax, bp
movzx ecx, bp
mov r9, r13
adc cx, bx
mov rdx, rsi
mov qword [rsp + 0x20], rbx
sub ax, cx
movzx ecx, word [rsp + 0x1bc]
cmp cx, ax
adc ax, bx
sub cx, ax
mov word [rsp + 0x1bc], cx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp eax, ebx
je 0x1400048a5
mov r8d, dword [rsp + 0xb4]
mov r9d, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp eax, ebx
je 0x1400048a5
lea r8, [rsp + 0x60]
mov rdx, rsi
mov rcx, rdi
call fcn.140003ab0
cmp bp, ax
jne 0x1400048a5
lea r8, [rsp + 0x1e0]
lea rdx, [0x140012468]
mov r9d, 0x170
mov rcx, rdi
call fcn.140003e68
cmp eax, ebx
lea eax, [r13 - 0x3f]
cmovne ebx, eax
mov rcx, r12
call fcn.1400049b0
mov eax, ebx
mov rcx, qword [rsp + 0x350]
xor rcx, rsp
call fcn.140004990
mov rbx, qword [rsp + 0x3b8]
add rsp, 0x360
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r13d, dword [rsp + 0x34]
mov r10d, 1
jmp 0x140004617