Function at 0x56ec00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.005707a0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.005707a0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x005f56e4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x56eda8
mov rax, qword [0x005f56e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x56ec4c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x56ecd7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x56ec30
mov rcx, r12
call fcn.0056f960
mov rbp, rax
test rax, rax
je 0x56ede2
mov rax, qword [0x005f56e8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.0056fa90
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x005f56e8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x56edf1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x56ecd0
sub eax, 4
and eax, 0xfffffffb
jne 0x56ed60
add dword [0x005f56e4], 1
cmp ebx, 8
jae 0x56ed08
test bl, 4
jne 0x56edb0
test ebx, ebx
je 0x56ecf9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x56edd0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x56ecf9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x56ed3a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x005f56e8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x56ecd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0056eb90
nop dword [rax]
xor edi, edi
jmp 0x56ec57
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x56ecf9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x56ecf9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.0056eb90
mov rax, qword [0x005f56e8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.0056eb90
nop
nop dword [rax]
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov esi, dword [0x005f56e0]
test esi, esi
je 0x56ee48
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov dword [0x005f56e0], 1
call fcn.0056f9f0
cdqe
lea rax, [rax + rax*4]
lea rax, [rax*8 + 0xf]
and rax, 0xfffffffffffffff0
call fcn.0056fc10
mov r12, qword [0x005aa7b0]
mov rbx, qword [0x005aa7c0]
mov dword [0x005f56e4], 0
sub rsp, rax
lea rax, [rsp + 0x20]
mov qword [0x005f56e8], rax
mov rax, r12
sub rax, rbx
cmp rax, 7
jle 0x56ee32
mov edx, dword [rbx]
cmp rax, 0xb
jg 0x56eff8
test edx, edx
jne 0x56f080
mov eax, dword [rbx + 4]
test eax, eax
jne 0x56f080
mov edx, dword [rbx + 8]
cmp edx, 1
jne 0x56f0e8
add rbx, 0xc
lea r15, [rbp - 0x58]
mov r13, qword [0x005aa7e0]
movabs r14, 0xffffffff00000000
cmp rbx, r12
jb 0x56ef29
jmp 0x56ee32
movzx r8d, byte [rcx]
mov rdi, r15
mov r10, r8
or r10, 0xffffffffffffff00
test r8b, r8b
cmovs r8, r10
sub r8, rdx
mov rdx, r15
add r8, r9
mov qword [rbp - 0x58], r8
mov r8d, 1
call 0x56ec00
add rbx, 0xc
cmp rbx, r12
jae 0x56efa0
mov edx, dword [rbx]
mov ecx, dword [rbx + 4]
movzx r8d, byte [rbx + 8]
add rdx, r13
add rcx, r13
mov r9, qword [rdx]
cmp r8d, 0x20
je 0x56f050
ja 0x56f020
cmp r8d, 8
je 0x56eef0
cmp r8d, 0x10
jne 0x56f0d1
movzx r8d, word [rcx]
mov rdi, r15
mov r10, r8
or r10, 0xffffffffffff0000
test r8w, r8w
cmovs r8, r10
add rbx, 0xc
sub r8, rdx
mov rdx, r15
add r8, r9
mov qword [rbp - 0x58], r8
mov r8d, 2
call 0x56ec00
cmp rbx, r12
jb 0x56ef29
nop word cs:[rax + rax]
mov eax, dword [0x005f56e4]
test eax, eax
jle 0x56ee32
mov r12, qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor ebx, ebx
nop word [rax + rax]
mov rax, qword [0x005f56e8]
add rax, rbx
mov r8d, dword [rax]
test r8d, r8d
je 0x56efe0
mov rdx, qword [rax + 0x10]
mov rcx, qword [rax + 8]
mov r9, rdi
call r12
add esi, 1
add rbx, 0x28
cmp esi, dword [0x005f56e4]
jl 0x56efc0
jmp 0x56ee32
test edx, edx
jne 0x56f080
mov eax, dword [rbx + 4]
mov edi, eax
or edi, dword [rbx + 8]
jne 0x56eeb8
mov edx, dword [rbx + 0xc]
add rbx, 0xc
jmp 0x56eead
cmp r8d, 0x40
jne 0x56f0d1
mov rax, qword [rcx]
mov r8d, 8
mov rdi, r15
sub rax, rdx
mov rdx, r15
add rax, r9
mov qword [rbp - 0x58], rax
call 0x56ec00
jmp 0x56ef20
mov eax, dword [rcx]
mov rdi, r15
mov r8, rax
or rax, r14
test r8d, r8d
cmovns rax, r8
mov r8d, 4
sub rax, rdx
mov rdx, r15
add rax, r9
mov qword [rbp - 0x58], rax
call 0x56ec00
jmp 0x56ef20
cmp rbx, r12
jae 0x56ee32
sub r12, 1
mov r13, qword [0x005aa7e0]
lea rdi, [rbp - 0x58]
sub r12, rbx
shr r12, 3
lea r12, [rbx + r12*8 + 8]
nop dword [rax]
mov ecx, dword [rbx + 4]
mov eax, dword [rbx]
mov r8d, 4
mov rdx, rdi
add rbx, 8
add rcx, r13
add eax, dword [rcx]
mov dword [rbp - 0x58], eax
call 0x56ec00
cmp rbx, r12
jne 0x56f0a8
jmp 0x56efa0
mov edx, r8d
lea rcx, str.__Unknown_pseudo_relocation_bit_size__d._n
mov qword [rbp - 0x58], 0
call fcn.0056eb90
lea rcx, str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.0056eb90
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
sub rsp, 0x58
mov rax, qword [0x005f56f0]
test rax, rax
je 0x56f13c
movsd xmm0, qword [rsp + 0x80]
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x28], rdx
movsd qword [rsp + 0x30], xmm2
movsd qword [rsp + 0x38], xmm3
movsd qword [rsp + 0x40], xmm0
call rax
nop
add rsp, 0x58
ret