Function at 0x407859
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov edi, edx
mov rsi, rcx
mov ecx, 0x62015e27
mov edx, 0x823f7074
call fcn.0040ac8c
mov rbx, rax
mov ecx, 0x62015e27
mov edx, 0x35aac36e
call fcn.0040ac8c
mov qword [rsp + 0x50], rax
mov ecx, 0x62015e27
mov edx, 0xa323e791
call fcn.0040ac8c
mov rbp, rax
mov ecx, 0x62015e27
mov edx, 0x238d0fe9
call fcn.0040ac8c
mov r13, rax
mov ecx, 0x62015e27
mov edx, 0xffa25533
call fcn.0040ac8c
mov r14, rax
mov ecx, 0x62015e27
mov edx, 0x51deefd6
call fcn.0040ac8c
mov r15, rax
mov ecx, 0x65f0e769
mov edx, 0xea402c23
call fcn.0040ac8c
mov qword [rsp + 0x48], rax
movsxd rax, dword [rsi + 0x3c]
cmp dword [rax + rsi], 0x4550
jne 0x4079cd
lea r12, [rax + rsi]
test byte [r12 + 0x38], 1
jne 0x4079cd
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x24], edi
lea r15, [rax + rsi]
add r15, 0x18
mov rcx, qword [r12 + 0x30]
mov edx, dword [r12 + 0x50]
mov r8d, 0x3000
mov r9d, 0x40
call rbx
mov rdi, rax
test rax, rax
jne 0x407964
mov edx, dword [r12 + 0x50]
xor ecx, ecx
mov r8d, 0x3000
mov r9d, 0x40
call rbx
mov rdi, rax
mov r8d, dword [r12 + 0x54]
mov rcx, rdi
mov rdx, rsi
call fcn.0046bf16
movzx eax, word [r12 + 0x14]
movzx ecx, word [r12 + 6]
imul r14, rcx, 0x28
mov rcx, r15
mov qword [rsp + 0x38], r15
add r15, rax
add r15, 0x14
xor ebx, ebx
xor ebp, ebp
cmp r14, rbp
je 0x4079e3
mov ecx, dword [r15 + rbp - 8]
mov r8d, dword [r15 + rbp - 4]
lea eax, [rcx + r8]
cmp eax, dword [r12 + 0x50]
ja 0x4079cf
mov eax, dword [r15 + rbp]
add rcx, rdi
add r8d, eax
lea rdx, [rsi + rax]
sub r8, rax
call fcn.0046bf16
add rbp, 0x28
jmp 0x407997
xor ebx, ebx
mov rax, rbx
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, rdi
sub rax, qword [r12 + 0x30]
mov r15, qword [rsp + 0x28]
je 0x407aa8
cmp dword [r12 + 0xb4], 0
je 0x407aa8
mov ecx, dword [r12 + 0xb0]
add rcx, rdi
movzx edx, ax
mov r8d, eax
and r8d, 0xffff0000
lea r9, [0x0046d08c]
cmp dword [rcx], 0
je 0x407aa8
mov r10d, dword [rcx + 4]
add r10d, 0xfffffff8
shr r10d, 1
xor r11d, r11d
cmp r10, r11
je 0x407a9c
movzx esi, word [rcx + r11*2 + 8]
mov ebx, esi
shr ebx, 0xc
dec ebx
cmp ebx, 9
ja case.0x407a55.4
movsxd rbx, dword [r9 + rbx*4]
add rbx, r9
jmp rbx
mov ebx, dword [rcx]
and esi, 0xfff
add rsi, rdi
add dword [rbx + rsi], r8d
jmp case.0x407a55.4
mov ebx, dword [rcx]
and esi, 0xfff
add rsi, rdi
add dword [rbx + rsi], eax
jmp case.0x407a55.4
mov ebx, dword [rcx]
and esi, 0xfff
add rsi, rdi
add dword [rbx + rsi], edx
jmp case.0x407a55.4
mov ebx, dword [rcx]
and esi, 0xfff
add rsi, rdi
add qword [rbx + rsi], rax
inc r11
jmp 0x407a37
mov r10d, dword [rcx + 4]
add rcx, r10
jmp 0x407a24
cmp dword [r12 + 0x94], 0
je 0x407b3d
mov r14d, dword [r12 + 0x90]
add r14, rdi
xor ebx, ebx
mov ecx, dword [r14 + 0xc]
test rcx, rcx
je 0x407b3d
add rcx, rdi
call r15
test rax, rax
je 0x4079cf
mov rsi, rax
mov ebp, dword [r14]
mov r15d, dword [r14 + 0x10]
add r15, rdi
add rbp, rdi
cmp qword [r15], 0
je 0x407b32
mov r8, qword [rbp]
js 0x407b14
lea rdx, [r8 + rdi]
add rdx, 2
mov rcx, rsi
call r13
test rax, rax
je 0x4079cf
mov qword [r15], rax
jmp 0x407b28
mov rcx, rsi
xor edx, edx
mov r9, r15
call qword [rsp + 0x48]
test eax, eax
jne 0x4079cf
add rbp, 8
add r15, 8
jmp 0x407aec
add r14, 0x14
mov r15, qword [rsp + 0x28]
jmp 0x407ac4
movzx eax, word [r12 + 0x14]
movzx ecx, word [r12 + 6]
imul rbx, rcx, 0x28
mov rcx, qword [rsp + 0x38]
lea r15, [rax + rcx]
add r15, 0xc
xor r13d, r13d
lea rsi, [rsp + 0x20]
mov r14d, dword [rsp + 0x24]
cmp rbx, r13
je 0x407cc7
mov edx, dword [r15 + r13 + 4]
test rdx, rdx
je 0x407cbe
mov ecx, dword [r15 + r13]
mov eax, dword [r15 + r13 + 0x18]
and dword [rsp + 0x20], 0
mov r11d, eax
and r11d, 0x20000000
sete r10b
mov ebp, eax
and ebp, 0x40000000
sete r9b
test eax, eax
setns r8b
or ebp, r11d
sete r11b
jne 0x407bcd
test r8b, r8b
je 0x407bcd
mov dword [rsp + 0x20], 1
mov r8d, 1
jmp 0x407cb4
test eax, eax
setns bpl
xor r11b, 1
or r11b, bpl
jne 0x407bef
mov dword [rsp + 0x20], 8
mov r8d, 8
jmp 0x407cb4
mov r11d, eax
shr r11d, 0x1e
and r11b, r10b
mov r10d, r11d
and r10b, r8b
cmp r10b, 1
jne 0x407c18
mov dword [rsp + 0x20], 2
mov r8d, 2
jmp 0x407cb4
test eax, eax
setns r10b
xor r11b, 1
or r11b, r10b
jne 0x407c37
mov dword [rsp + 0x20], 4
mov r8d, 4
jmp 0x407cb4
mov r10d, eax
shr r10d, 0x1d
and r10b, r9b
and r8b, r10b
cmp r8b, 1
jne 0x407c5a
mov dword [rsp + 0x20], 0x10
mov r8d, 0x10
jmp 0x407cb4
test eax, eax
setns r8b
xor r10b, 1
or r10b, r8b
jne 0x407c79
mov dword [rsp + 0x20], 0x80
mov r8d, 0x80
jmp 0x407cb4
mov r8d, eax
and r8d, 0xe0000000
cmp r8d, 0x60000000
jne 0x407c9c
mov dword [rsp + 0x20], 0x20
mov r8d, 0x20
jmp 0x407cb4
xor r8d, r8d
cmp eax, 0xe0000000
jb 0x407cb4
mov dword [rsp + 0x20], 0x40
mov r8d, 0x40
add rcx, rdi
mov r9, rsi
call qword [rsp + 0x50]
add r13, 0x28
jmp 0x407b67
mov rcx, 0xffffffffffffffff
xor edx, edx
xor r8d, r8d
call qword [rsp + 0x40]
cmp dword [r12 + 0xd4], 0
je 0x407d0a
mov eax, dword [r12 + 0xd0]
mov rsi, qword [rax + rdi + 0x18]
mov rax, qword [rsi]
test rax, rax
je 0x407d0a
mov rcx, rdi
mov edx, 1
xor r8d, r8d
call rax
add rsi, 8
jmp 0x407cef
mov eax, dword [r12 + 0xa4]
test eax, eax
je 0x407d36
mov ecx, dword [r12 + 0xa0]
add rcx, rdi
mov r8d, 0xc
xor edx, edx
div r8d
lea edx, [rax - 1]
mov r8, rdi
call qword [rsp + 0x30]
mov eax, dword [r12 + 0x28]
add rax, rdi
mov r8d, 1
mov rcx, rdi
mov edx, 1
call rax
test r14d, r14d
je 0x407db6
cmp dword [r12 + 0x8c], 0
je 0x407db6
mov eax, dword [r12 + 0x88]
mov esi, dword [rax + rdi + 0x20]
add rsi, rdi
mov ebx, dword [rax + rdi + 0x24]
add rbx, rdi
mov r15d, dword [rax + rdi + 0x18]
mov r14d, dword [rax + rdi + 0x1c]
add r14, rdi
xor r12d, r12d
cmp r15, r12
je 0x407db6
mov ecx, dword [rsi + r12*4]
add rcx, rdi
call fcn.0040ad87
mov rcx, rax
call fcn.0040ada0
cmp eax, dword [rsp + 0x24]
je 0x407da8
inc r12
jmp 0x407d84
movzx eax, word [rbx + r12*2]
mov eax, dword [r14 + rax*4]
add rax, rdi
call rax
mov rbx, rdi
jmp 0x4079cf