Function at 0x596850
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov r14d, dword [rcx]
mov rbx, qword [rsp + 0xf0]
mov eax, r8d
mov qword [rsp + 0xd8], rdx
mov edx, 0xaaaaaaab
mov r12, rcx
add eax, 2
mov dword [rsp + 0xe0], r8d
imul rax, rdx
mov qword [rsp + 0xe8], r9
shr rax, 0x21
lea edx, [rax + 1]
and eax, 0xfffffffe
mov dword [rsp + 0x5c], eax
mov rax, qword [rsp + 0xf8]
and edx, 0xfffffffe
mov dword [rsp + 0x58], edx
mov rsi, qword [rax]
mov eax, dword [rax + 0x20]
mov dword [rsi + 0x80], r14d
mov ecx, dword [rcx + 4]
lea r13, [rsi + 0x80]
mov dword [rsp + 0x7c], eax
shr eax, 7
mov dword [rsi + 0x84], ecx
mov edx, dword [r12 + 8]
mov dword [rsp + 0x48], eax
mov dword [rsi + 0x88], edx
mov r11d, dword [r12 + 0xc]
mov dword [rsp + 0x70], ecx
mov dword [rsi + 0x8c], r11d
mov edi, dword [r12 + 0x10]
mov dword [rsp + 0x78], edx
mov dword [rsi + 0x90], edi
mov r8d, dword [r12 + 0x14]
mov dword [rsp + 0x68], r11d
mov dword [rsi + 0x94], r8d
mov r15d, dword [r12 + 0x18]
shl r8, 0x20
or r14, r8
mov dword [rsi + 0x98], r15d
mov r10d, dword [r12 + 0x1c]
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x60], r10d
mov dword [rsi + 0x9c], r10d
mov r10d, dword [r12 + 0x20]
mov r8, qword [rsp + 0x68]
mov dword [rsi + 0xa0], r10d
mov edx, dword [r12 + 0x24]
shl r8, 0x20
mov dword [rsi + 0xa4], edx
mov ebp, dword [r12 + 0x28]
shl rdx, 0x20
or rdx, rdi
mov dword [rsi + 0xa8], ebp
mov r15d, dword [r12 + 0x2c]
mov dword [rsi + 0xac], r15d
mov r9d, dword [r12 + 0x30]
shl r15, 0x20
mov dword [rsi + 0xb0], r9d
mov eax, dword [r12 + 0x34]
mov dword [rsi + 0xb4], eax
mov r11d, dword [r12 + 0x38]
shl rax, 0x20
or rax, r10
mov dword [rsi + 0xb8], r11d
or r11, r8
mov ecx, dword [r12 + 0x3c]
mov r8d, 1
mov qword [rsi + 0x18], r11
mov r11, qword [rsp + 0x60]
mov qword [rsi + 0x10], rdx
mov edx, dword [rsp + 0x78]
shl r11, 0x20
mov qword [rsi + 0x20], rax
mov rax, r11
mov dword [rsi + 0xbc], ecx
shl rcx, 0x20
or rax, rdx
mov rdx, qword [rsp + 0x70]
or rcx, rbp
mov qword [rsi], r14
mov qword [rsi + 0x28], rax
mov eax, dword [rsp + 0x50]
lea r14, [rsi + 0x100]
shl rdx, 0x20
mov qword [rsi + 8], rcx
or r9, rdx
or r15, rax
mov qword [rsi + 0x30], r9
mov qword [rsi + 0x38], r15
mov ecx, dword [r12 + 0x40]
mov dword [rsi + 0x80], ecx
mov eax, dword [r12 + 0x44]
mov dword [rsi + 0x84], eax
mov eax, dword [r12 + 0x48]
mov dword [rsi + 0x88], eax
mov eax, dword [r12 + 0x4c]
mov dword [rsi + 0x8c], eax
mov eax, dword [r12 + 0x50]
mov dword [rsi + 0x90], eax
mov edx, dword [r12 + 0x54]
mov dword [rsi + 0x94], edx
mov eax, dword [r12 + 0x58]
shl rdx, 0x20
or rcx, rdx
mov dword [rsi + 0x98], eax
mov eax, dword [r12 + 0x5c]
mov dword [rsi + 0x9c], eax
mov eax, dword [r12 + 0x60]
mov dword [rsi + 0xa0], eax
mov eax, dword [r12 + 0x64]
mov dword [rsi + 0xa4], eax
mov eax, dword [r12 + 0x68]
mov dword [rsi + 0xa8], eax
mov eax, dword [r12 + 0x6c]
mov edx, dword [rsi + 0xa8]
mov dword [rsi + 0xac], eax
mov eax, dword [r12 + 0x70]
mov dword [rsi + 0xb0], eax
mov eax, dword [r12 + 0x74]
mov dword [rsi + 0xb4], eax
mov eax, dword [r12 + 0x78]
mov dword [rsi + 0xb8], eax
mov eax, dword [r12 + 0x7c]
mov qword [rsi + 0x40], rcx
mov rcx, rsi
mov dword [rsi + 0xbc], eax
shl rax, 0x20
or rax, rdx
mov qword [rsi + 0x48], rax
mov eax, dword [rsi + 0xa4]
mov edx, dword [rsi + 0x90]
shl rax, 0x20
or rax, rdx
mov edx, dword [rsi + 0xb8]
mov qword [rsi + 0x50], rax
mov eax, dword [rsi + 0x8c]
shl rax, 0x20
or rax, rdx
mov edx, dword [rsi + 0xa0]
mov qword [rsi + 0x58], rax
mov eax, dword [rsi + 0xb4]
shl rax, 0x20
or rax, rdx
mov edx, dword [rsi + 0x88]
mov qword [rsi + 0x60], rax
mov eax, dword [rsi + 0x9c]
shl rax, 0x20
xor r9d, r9d
or rax, rdx
mov edx, dword [rsi + 0xb0]
mov qword [rsi + 0x68], rax
mov eax, dword [rsi + 0x84]
shl rax, 0x20
or rax, rdx
mov edx, dword [rsi + 0x98]
mov qword [rsi + 0x70], rax
mov eax, dword [rsi + 0xac]
shl rax, 0x20
or rax, rdx
mov rdx, r13
mov qword [rsi + 0x78], rax
call fcn.00591230
mov rdx, r14
xor r9d, r9d
mov rcx, r13
mov r8d, 1
call fcn.00591230
mov eax, dword [rsp + 0x48]
mov edx, dword [rsi + 0x140]
cmp eax, 2
jbe 0x5973f0
mov edi, dword [rsp + 0x7c]
sub eax, 1
mov r9d, 2
mov r15d, 0x100
mov dword [rsp + 0x60], eax
shr edi, 8
mov dword [rsp + 0x50], edi
cmp dword [rsp + 0x50], r9d
ja 0x596c6b
nop dword [rax + rax]
mov r10d, dword [rsp + 0x60]
sub r10d, r9d
cmp r10d, 1
jbe 0x596c53
lea ebp, [r9 - 1]
mov rdi, r14
mov r11d, 1
nop dword [rax + rax]
and edx, ebp
lea r13, [rdi + 0x80]
mov rcx, rdi
add rdi, 0x100
lea edx, [r11 + rdx - 1]
mov r8, r13
shl rdx, 7
add rdx, rsi
call fcn.005964d0
mov r8, rdi
mov rcx, r13
and eax, ebp
lea edx, [rax + r11]
shl rdx, 7
add rdx, rsi
call fcn.005964d0
add r11d, 2
mov edx, eax
cmp r10d, r11d
ja 0x596bf0
lea eax, [r10 - 2]
shr eax, 1
add rax, 1
shl rax, 8
cmp r10d, 1
cmovbe rax, r15
add r14, rax
lea eax, [r9 + r9]
cmp dword [rsp + 0x48], eax
jbe 0x596c78
mov r9d, eax
cmp dword [rsp + 0x50], r9d
jbe 0x596bd0
mov r10d, r9d
jmp 0x596bde
lea r10d, [r9 - 1]
and edx, r10d
mov eax, dword [rsp + 0x48]
lea r11, [r14 + 0x80]
mov rcx, r14
mov r8, r11
sub eax, r9d
lea edx, [rax + rdx - 2]
mov r9d, eax
shl rdx, 7
add rdx, rsi
call fcn.005964d0
mov r8, rbx
and r10d, eax
mov rcx, r11
lea edx, [r9 + r10 - 1]
shl rdx, 7
add rdx, rsi
call fcn.005964d0
mov rdx, qword [rbx + 8]
mov rax, qword [rbx]
xor r8d, r8d
mov qword [rbx + 0x88], rdx
mov rdx, qword [rbx + 0x10]
mov qword [rbx + 0x80], rax
mov qword [rbx + 0x90], rdx
mov rdx, qword [rbx + 0x18]
mov qword [rbx + 0x98], rdx
mov rdx, qword [rbx + 0x20]
mov qword [rbx + 0xa0], rdx
mov rdx, qword [rbx + 0x28]
mov qword [rbx + 0xa8], rdx
mov rdx, qword [rbx + 0x30]
mov qword [rbx + 0xb0], rdx
mov rdx, qword [rbx + 0x38]
mov qword [rbx + 0xb8], rdx
mov dword [r12], eax
mov eax, dword [rbx + 0xb4]
mov dword [r12 + 4], eax
mov rax, qword [rbx + 0xa8]
mov dword [r12 + 8], eax
mov eax, dword [rbx + 0x9c]
mov dword [r12 + 0xc], eax
mov rax, qword [rbx + 0x90]
mov dword [r12 + 0x10], eax
mov eax, dword [rbx + 0x84]
mov dword [r12 + 0x14], eax
mov rax, qword [rbx + 0xb8]
mov dword [r12 + 0x18], eax
mov eax, dword [rbx + 0xac]
mov dword [r12 + 0x1c], eax
mov rax, qword [rbx + 0xa0]
mov dword [r12 + 0x20], eax
mov eax, dword [rbx + 0x94]
mov dword [r12 + 0x24], eax
mov rax, qword [rbx + 0x88]
mov dword [r12 + 0x28], eax
mov eax, dword [rbx + 0xbc]
mov dword [r12 + 0x2c], eax
mov rax, qword [rbx + 0xb0]
mov dword [r12 + 0x30], eax
mov eax, dword [rbx + 0xa4]
mov dword [r12 + 0x34], eax
mov rax, qword [rbx + 0x98]
mov dword [r12 + 0x38], eax
mov eax, dword [rbx + 0x8c]
mov dword [r12 + 0x3c], eax
mov rdx, qword [rbx + 0x48]
mov rax, qword [rbx + 0x40]
mov qword [rbx + 0x88], rdx
mov rdx, qword [rbx + 0x50]
mov qword [rbx + 0x80], rax
mov qword [rbx + 0x90], rdx
mov rdx, qword [rbx + 0x58]
mov qword [rbx + 0x98], rdx
mov rdx, qword [rbx + 0x60]
mov qword [rbx + 0xa0], rdx
mov rdx, qword [rbx + 0x68]
mov qword [rbx + 0xa8], rdx
mov rdx, qword [rbx + 0x70]
mov qword [rbx + 0xb0], rdx
mov rdx, qword [rbx + 0x78]
mov qword [rbx + 0xb8], rdx
xor edx, edx
mov dword [r12 + 0x40], eax
mov eax, dword [rbx + 0xb4]
mov dword [r12 + 0x44], eax
mov rax, qword [rbx + 0xa8]
mov rsi, qword [rsp + 0xd8]
mov r14, qword [rsp + 0xe8]
mov dword [r12 + 0x48], eax
mov eax, dword [rbx + 0x9c]
shl rsi, 7
mov dword [r12 + 0x4c], eax
mov rax, qword [rbx + 0x90]
add r14, rsi
mov dword [r12 + 0x50], eax
mov eax, dword [rbx + 0x84]
mov dword [r12 + 0x54], eax
mov rax, qword [rbx + 0xb8]
mov dword [r12 + 0x58], eax
mov eax, dword [rbx + 0xac]
mov dword [r12 + 0x5c], eax
mov rax, qword [rbx + 0xa0]
mov dword [r12 + 0x60], eax
mov eax, dword [rbx + 0x94]
mov dword [r12 + 0x64], eax
mov rax, qword [rbx + 0x88]
mov dword [r12 + 0x68], eax
mov eax, dword [rbx + 0xbc]
mov dword [r12 + 0x6c], eax
mov rax, qword [rbx + 0xb0]
mov dword [r12 + 0x70], eax
mov eax, dword [rbx + 0xa4]
mov dword [r12 + 0x74], eax
mov rax, qword [rbx + 0x98]
mov dword [r12 + 0x78], eax
mov eax, dword [rbx + 0x8c]
mov dword [r12 + 0x7c], eax
mov rax, qword [rsp + 0xd8]
add rax, rax
mov qword [rsp + 0x48], rax
nop dword [rax]
mov eax, r8d
shl rdx, 6
add rdx, qword [rsp + 0xe8]
shl eax, 6
add rax, r12
mov r9d, dword [rax]
mov dword [r14], r9d
mov ecx, dword [rax + 4]
mov dword [r14 + 4], ecx
mov ecx, dword [rax + 8]
mov dword [r14 + 8], ecx
mov ecx, dword [rax + 0xc]
mov dword [r14 + 0xc], ecx
mov ecx, dword [rax + 0x10]
mov dword [r14 + 0x10], ecx
mov ecx, dword [rax + 0x14]
mov dword [r14 + 0x14], ecx
mov r10d, dword [rax + 0x18]
shl rcx, 0x20
or rcx, r9
mov dword [r14 + 0x18], r10d
mov r10d, dword [rax + 0x1c]
mov dword [r14 + 0x1c], r10d
mov r10d, dword [rax + 0x20]
mov dword [r14 + 0x20], r10d
mov r10d, dword [rax + 0x24]
mov dword [r14 + 0x24], r10d
mov r10d, dword [rax + 0x28]
mov dword [r14 + 0x28], r10d
mov r10d, dword [rax + 0x2c]
mov dword [r14 + 0x2c], r10d
mov r10d, dword [rax + 0x30]
mov dword [r14 + 0x30], r10d
mov r10d, dword [rax + 0x34]
mov dword [r14 + 0x34], r10d
mov r10d, dword [rax + 0x38]
mov dword [r14 + 0x38], r10d
mov eax, dword [rax + 0x3c]
mov dword [r14 + 0x3c], eax
mov qword [rdx], rcx
mov eax, dword [r14 + 0x3c]
mov ecx, dword [r14 + 0x28]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 8], rax
mov eax, dword [r14 + 0x24]
mov ecx, dword [r14 + 0x10]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 0x10], rax
mov eax, dword [r14 + 0xc]
mov ecx, dword [r14 + 0x38]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 0x18], rax
mov eax, dword [r14 + 0x34]
mov ecx, dword [r14 + 0x20]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 0x20], rax
mov eax, dword [r14 + 0x1c]
mov ecx, dword [r14 + 8]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 0x28], rax
mov eax, dword [r14 + 4]
mov ecx, dword [r14 + 0x30]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 0x30], rax
mov eax, dword [r14 + 0x2c]
mov ecx, dword [r14 + 0x18]
shl rax, 0x20
or rax, rcx
mov qword [rdx + 0x38], rax
lea edx, [r8 + 1]
mov r8, rdx
cmp qword [rsp + 0x48], rdx
ja 0x596f00
mov r9, qword [rsp + 0xf8]
mov r8, qword [rsp + 0xd8]
mov rdx, r14
lea r13, [r14 + rsi]
mov rcx, qword [rsp + 0xe8]
call fcn.00591230
mov r9, qword [rsp + 0xf8]
mov rdx, r13
mov rcx, r14
mov r8, qword [rsp + 0xd8]
call fcn.00591230
cmp dword [rsp + 0xe0], 2
mov eax, dword [r13 + rsi - 0x40]
jbe 0x5973e0
mov edi, dword [rsp + 0xe0]
mov qword [rsp + 0xf0], rbx
mov ebp, 2
mov qword [rsp + 0xd0], r12
mov r12, r13
shr edi, 1
mov dword [rsp + 0x60], edi
mov rdi, qword [rsp + 0xd8]
shl rdi, 8
mov qword [rsp + 0x50], rdi
mov edi, dword [rsp + 0xe0]
sub edi, 1
mov dword [rsp + 0x68], edi
nop dword [rax]
mov edi, dword [rsp + 0x68]
sub edi, ebp
cmp dword [rsp + 0x60], ebp
cmova edi, ebp
cmp edi, 1
jbe 0x59717f
mov ecx, ebp
lea ebx, [rbp - 1]
mov r15, r12
mov ebp, edi
mov r14d, 1
mov edi, ecx
and eax, ebx
lea r13, [rsi + r15]
mov r9, qword [rsp + 0xd8]
mov rcx, r15
lea edx, [r14 + rax - 1]
mov rax, qword [rsp + 0xf8]
mov r8, r13
imul rdx, rsi
add rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x20], rax
call fcn.00593120
add r15, qword [rsp + 0x50]
mov r9, qword [rsp + 0xd8]
mov rcx, r13
and eax, ebx
mov r8, r15
lea edx, [rax + r14]
mov rax, qword [rsp + 0xf8]
add r14d, 2
imul rdx, rsi
add rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x20], rax
call fcn.00593120
cmp r14d, ebp
jb 0x5970f0
mov ecx, edi
mov edi, ebp
sub edi, 2
mov ebp, ecx
shr edi, 1
add rdi, 1
imul rdi, qword [rsp + 0x50]
add r12, rdi
lea edx, [rbp + rbp]
cmp dword [rsp + 0xe0], edx
jbe 0x597198
mov ebp, edx
jmp 0x5970c8
and ebp, 0x7fffffff
mov r13, r12
mov rbx, qword [rsp + 0xf0]
mov r12, qword [rsp + 0xd0]
lea r15d, [rbp - 1]
and eax, r15d
mov edi, dword [rsp + 0xe0]
lea r14, [r13 + rsi]
mov r9, qword [rsp + 0xd8]
mov rcx, r13
mov r8, r14
sub edi, ebp
lea edx, [rdi + rax - 2]
mov rax, qword [rsp + 0xf8]
imul rdx, rsi
add rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x20], rax
call fcn.00593120
mov r9, qword [rsp + 0xd8]
mov rcx, r14
mov r8, rbx
and r15d, eax
mov rax, qword [rsp + 0xf8]
lea edx, [rdi + r15 - 1]
mov qword [rsp + 0x20], rax
imul rdx, rsi
add rsi, rbx
add rdx, qword [rsp + 0xe8]
call fcn.00593120
xor ecx, ecx
xor eax, eax
nop dword [rax]
shl rax, 6
lea rdx, [rbx + rax]
add rax, r12
mov r8d, dword [rdx]
mov dword [rsi], r8d
mov r8d, dword [rdx + 4]
mov dword [rsi + 4], r8d
mov r8d, dword [rdx + 8]
mov dword [rsi + 8], r8d
mov r8d, dword [rdx + 0xc]
mov dword [rsi + 0xc], r8d
mov r8d, dword [rdx + 0x10]
mov dword [rsi + 0x10], r8d
mov r8d, dword [rdx + 0x14]
mov dword [rsi + 0x14], r8d
mov r8d, dword [rdx + 0x18]
mov dword [rsi + 0x18], r8d
mov r8d, dword [rdx + 0x1c]
mov dword [rsi + 0x1c], r8d
mov r8d, dword [rdx + 0x20]
mov dword [rsi + 0x20], r8d
mov r8d, dword [rdx + 0x24]
mov dword [rsi + 0x24], r8d
mov r8d, dword [rdx + 0x28]
mov dword [rsi + 0x28], r8d
mov r8d, dword [rdx + 0x2c]
mov dword [rsi + 0x2c], r8d
mov r8d, dword [rdx + 0x30]
mov dword [rsi + 0x30], r8d
mov r8d, dword [rdx + 0x34]
mov dword [rsi + 0x34], r8d
mov r8d, dword [rdx + 0x38]
mov dword [rsi + 0x38], r8d
mov edx, dword [rdx + 0x3c]
mov dword [rsi + 0x3c], edx
mov rdx, qword [rsi]
mov dword [rax], edx
mov edx, dword [rsi + 0x34]
mov dword [rax + 4], edx
mov rdx, qword [rsi + 0x28]
mov dword [rax + 8], edx
mov edx, dword [rsi + 0x1c]
mov dword [rax + 0xc], edx
mov rdx, qword [rsi + 0x10]
mov dword [rax + 0x10], edx
mov rdx, qword [rsi]
shr rdx, 0x20
mov dword [rax + 0x14], edx
mov rdx, qword [rsi + 0x38]
mov dword [rax + 0x18], edx
mov edx, dword [rsi + 0x2c]
mov dword [rax + 0x1c], edx
mov rdx, qword [rsi + 0x20]
mov dword [rax + 0x20], edx
mov edx, dword [rsi + 0x14]
mov dword [rax + 0x24], edx
mov rdx, qword [rsi + 8]
mov dword [rax + 0x28], edx
mov edx, dword [rsi + 0x3c]
mov dword [rax + 0x2c], edx
mov rdx, qword [rsi + 0x30]
mov dword [rax + 0x30], edx
mov edx, dword [rsi + 0x24]
mov dword [rax + 0x34], edx
mov rdx, qword [rsi + 0x18]
mov dword [rax + 0x38], edx
mov edx, dword [rsi + 0xc]
mov dword [rax + 0x3c], edx
lea eax, [rcx + 1]
mov rcx, rax
cmp qword [rsp + 0x48], rax
ja 0x597238
mov rax, qword [rsp + 0xf8]
mov edi, dword [rsp + 0x5c]
mov qword [rsp + 0x28], rbx
mov rcx, r12
mov r8d, dword [rsp + 0xe0]
mov rdx, qword [rsp + 0xd8]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xe8]
mov r9d, edi
mov qword [rsp + 0x20], rax
call fcn.005964e0
cmp dword [rsp + 0x58], edi
ja 0x597398
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x28], rbx
mov r9d, 2
mov rcx, r12
mov r8d, dword [rsp + 0xe0]
mov rdx, qword [rsp + 0xd8]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0x20], rax
call fcn.005964e0
jmp 0x59737e
xor eax, eax
xor r15d, r15d
mov ebp, 1
jmp 0x5971b8
xor edx, edx
xor r10d, r10d
mov r9d, 1
jmp 0x596c7f