Function at 0x4083e0
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, 0x908
mov eax, dword [rcx + 0x94]
mov edi, dword [rcx + 0x88]
mov r10, qword [rcx + 0x80]
mov edx, eax
sub eax, 1
mov r12, rcx
sub edx, edi
test edi, edi
mov dword [rsp + 0x6c], edi
mov dword [rsp + 0x38], eax
je 0x409035
mov eax, edi
mov dword [rsp + 0x3c], 0
xor r14d, r14d
mov ebp, 1
lea r13d, [rdx - 1]
mov r15d, 0x10
jmp 0x40845e
cmp ebp, 0x88
ja 0x4084f0
sub r15d, 1
je 0x408880
test eax, eax
je 0x408880
mov edx, eax
lea rdx, [rdx + rdx*8]
lea r8, [r10 + rdx*4]
movzx ecx, word [r8 + 0xc]
movzx edx, word [r8 + 0xe]
mov ebx, ecx
sub eax, edx
test cl, 2
je 0x408456
movzx r8d, word [r8 + 0x10]
movzx ecx, ch
add ecx, r8d
sub edx, ecx
mov rcx, qword [r12 + 0xd60]
mov r8, qword [rcx + 0x10]
mov r9d, dword [rcx + 0x2c]
mov ecx, dword [rsp + 0x38]
sub ecx, r9d
add rcx, r8
cmp bl, 3
movzx r11d, byte [rcx]
je 0x408840
lea ebx, [rax + r13]
mov edi, ebx
sub edi, r9d
add r8, rdi
cmp byte [r8], r11b
jne 0x408440
mov r9d, ebp
movzx edi, byte [r8 + r9]
cmp byte [rcx + r9], dil
je 0x408c50
add r14d, 1
cmp ebp, 0x88
jbe 0x40844c
nop dword [rax]
nop word cs:[rax + rax]
mov edx, 0x88
mov ecx, dword [r12 + 0x8c]
add edx, dword [rsp + 0x6c]
cmp edx, ecx
ja 0x408965
mov r10d, dword [rsp + 0x3c]
test r10d, r10d
je 0x408c30
mov r10d, dword [rsp + 0x6c]
lea rdx, [rsp + 0x70]
mov ebx, 1
lea rax, [r12 + 0x9560]
mov rsi, qword [0x0042ce60]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x3c]
lea r15, [rsp + 0x74]
sub eax, 1
shl rax, 4
lea rax, [rdx + rax + 0x14]
mov qword [rsp + 0x58], rax
nop
nop word cs:[rax + rax]
mov eax, dword [r15 + 4]
mov rcx, qword [r12 + 0x58]
mov r9, qword [r12 + 0x80]
mov r13, qword [rsp + 0x60]
mov dword [rsp + 0x34], eax
mov eax, dword [r15 + 8]
mov edi, dword [r15 + 0xc]
mov r14, qword [0x0042cd70]
movzx r8d, word [r15]
mov dword [rsp + 0x3c], eax
mov eax, dword [r12 + 0x94]
mov dword [rsp + 0x38], edi
lea edx, [rax - 1]
sub edx, dword [r12 + 0x74]
and eax, 3
movzx edx, byte [rcx + rdx]
mov ecx, r10d
lea rcx, [rcx + rcx*8]
movzx ecx, word [r9 + rcx*4 + 0x12]
mov rdi, rdx
lea rdx, [r13 + rdx*4]
lea rax, [rax + rcx*4 + 0x100]
mov rcx, qword [0x0042cd60]
lea rax, [r13 + rax*4]
mov rbp, qword [rcx]
movzx ecx, byte [rdx]
movzx r11d, byte [r14 + rcx + 0x200]
movzx ecx, byte [rax]
movzx ecx, byte [r14 + rcx + 0x200]
lea rcx, [rcx + r11*8 + 0x270]
mov r11, qword [0x0042cd70]
movzx ecx, word [r13 + rcx*2]
shr ecx, 6
movzx r14d, word [rbp + rcx*4]
movzx ecx, byte [rdx + 1]
movzx r11d, byte [r11 + rcx + 0x200]
movzx ecx, byte [rax + 1]
mov qword [rsp + 0x40], r11
mov r11, qword [0x0042cd70]
movzx ecx, byte [r11 + rcx + 0x200]
mov r11, qword [rsp + 0x40]
lea rcx, [rcx + r11*8 + 0x270]
movzx ecx, word [r13 + rcx*2]
shr ecx, 6
movzx r11d, word [rbp + rcx*4 + 2]
mov rcx, qword [0x0042cd70]
movzx edx, byte [rdx + 3]
movzx eax, byte [rax + 3]
movzx edx, byte [rcx + rdx + 0x200]
movzx eax, byte [rcx + rax + 0x200]
mov rcx, qword [0x0042cea0]
lea rax, [rax + rdx*8 + 0x270]
mov edx, dword [rsp + 0x3c]
movzx eax, word [r13 + rax*2]
add edx, dword [rcx + 0x140]
shr eax, 6
cmp edx, dword [rcx + 0x138]
movzx r13d, word [rbp + rax*4]
jae 0x408bc0
mov rax, qword [rcx + 0x10]
movzx eax, byte [rax + rdx]
lea edx, [rax + 1]
movsxd rdi, edi
mov eax, eax
shl rdi, 5
add r14d, r11d
lea rcx, [rdi + rax + 0x5ae8]
add r13d, r14d
movzx r14d, byte [r15 + 2]
lea rdx, [rdx + rdi + 0x5ae8]
movzx ecx, word [r12 + rcx*2]
movzx edx, word [r12 + rdx*2]
mov rdi, qword [0x0042cea0]
sub edx, ecx
mov rcx, qword [rdi]
shr edx, 4
movzx edx, word [rbp + rdx*4 + 2]
movzx eax, byte [rcx + rax]
shl eax, 9
add r13d, eax
movzx eax, byte [r15 + 3]
add r13d, edx
test al, al
jne 0x408b90
mov eax, dword [rsp + 0x3c]
mov edi, 0x1f
bsr edx, r14d
xor edx, 0x1f
add eax, 1
bsr eax, eax
xor eax, 0x1f
sub edi, eax
mov eax, edi
mov edi, 0x1f
and eax, 0xfffffff8
sub edi, edx
or eax, edi
cdqe
mov qword [rsp + 0x50], r15
mov r11d, dword [r12 + 0x90]
mov r15d, r13d
lea rdi, [rax + rax*2]
mov rax, rbp
mov r13, r9
mov ebp, r10d
mov r9d, r14d
shl rdi, 3
mov r14d, r8d
mov r10, rax
jmp 0x4087f6
mov rax, qword [rsi + 0x10]
movzx eax, byte [rax + rdx]
lea edx, [rax + 1]
mov eax, eax
lea rcx, [rdi + rax + 0x5668]
lea rdx, [rdx + rdi + 0x5668]
movzx ecx, word [r12 + rcx*2]
movzx edx, word [r12 + rdx*2]
sub edx, ecx
mov rcx, qword [rsi]
shr edx, 4
movzx edx, word [r10 + rdx*4 + 2]
movzx eax, byte [rcx + rax]
shl eax, 9
add eax, r15d
add eax, edx
lea edx, [rbx + rbp]
lea rdx, [rdx + rdx*8]
lea rdx, [r13 + rdx*4]
lea ecx, [rax + r11]
cmp dword [rdx], ecx
jbe 0x4087ea
mov dword [rdx], ecx
mov ecx, dword [rsp + 0x34]
xor r8d, r8d
mov word [rdx + 0xe], bx
mov word [rdx + 0x10], r8w
mov dword [rdx + 4], ecx
mov ecx, dword [rsp + 0x38]
mov dword [rdx + 8], ecx
mov ecx, 2
mov word [rdx + 0xc], cx
add ebx, 1
cmp r14d, ebx
jb 0x408b40
mov edx, dword [rsi + 0x140]
add edx, ebx
sub edx, r9d
cmp edx, dword [rsi + 0x138]
jb 0x408770
mov rcx, rsi
mov dword [rsp + 0x48], r11d
mov qword [rsp + 0x40], r10
mov dword [rsp + 0x3c], r9d
call fcn.0041de60
mov r11d, dword [rsp + 0x48]
mov r10, qword [rsp + 0x40]
mov r9d, dword [rsp + 0x3c]
jmp 0x408778
lea ebx, [rax + 1]
lea edi, [rbx + r13]
mov dword [rsp + 0x40], ebx
mov ebx, edi
mov dword [rsp + 0x34], edi
sub ebx, r9d
add rbx, r8
cmp byte [rbx], r11b
jne 0x4084af
mov esi, ebp
movzx edi, byte [rbx + rsi]
cmp byte [rcx + rsi], dil
je 0x408f35
add r14d, 1
jmp 0x4084af
mov dword [rsp + 0x34], ebp
mov eax, dword [rsp + 0x38]
sub eax, dword [r12 + 0x11a4]
cmp eax, 0x3fffffff
ja 0x408e3b
mov rax, qword [r12 + 0xd60]
mov r15d, dword [rsp + 0x38]
mov edi, dword [rsp + 0x34]
mov rbx, qword [rax + 0x10]
mov qword [rsp + 0x40], rax
mov eax, dword [rax + 0x2c]
mov qword [rsp + 0x48], rbx
sub r15d, eax
mov dword [rsp + 0x50], eax
add r15, rbx
movzx eax, byte [r15]
mov edx, dword [r15]
add r14d, dword [r12 + rax*4 + 0xd90]
mov ecx, edx
mov eax, edx
xor ecx, 0x3d
shr eax, 0x10
xor eax, ecx
lea eax, [rax + rax*8]
mov dword [rsp + 0x68], r14d
mov ecx, eax
shr ecx, 4
xor eax, ecx
imul ecx, eax, 0x27d4eb2d
mov eax, ecx
shr eax, 0xf
xor eax, ecx
mov ecx, dword [r12 + 0xd8c]
shr eax, cl
mov rcx, qword [r12 + 0xd80]
cmp edi, 2
mov r11d, dword [rcx + rax*4]
jbe 0x408cf0
mov ebp, dword [r12 + 0x11a8]
xor r13d, r13d
xor r14d, r14d
mov r8d, r11d
nop
sub ebp, 1
je 0x40894a
mov eax, dword [r12 + 0x1194]
sub eax, r8d
cmp eax, dword [r12 + 0x1198]
jb 0x4089c0
mov edx, dword [rsp + 0x34]
mov ecx, dword [r12 + 0x8c]
sub edx, 1
add edx, dword [rsp + 0x6c]
cmp edx, ecx
jbe 0x408509
lea r8d, [rcx + 1]
mov r9, qword [r12 + 0x80]
not ecx
lea rax, [r8 + r8*8]
add ecx, edx
add rcx, r8
lea rcx, [rcx + rcx*8]
lea rax, [r9 + rax*4]
lea rcx, [r9 + rcx*4 + 0x24]
nop dword [rax]
xor r9d, r9d
mov dword [rax], 0x40000000
add rax, 0x24
mov word [rax - 0x16], r9w
cmp rcx, rax
jne 0x408990
mov dword [r12 + 0x8c], edx
jmp 0x408509
sub r8d, dword [r12 + 0x1190]
mov esi, dword [rsp + 0x38]
mov eax, r8d
sar eax, 0x1f
and eax, dword [r12 + 0x119c]
add eax, r8d
lea rdx, [rax + rax*8]
mov dword [rsp + 0x58], eax
mov rax, qword [r12 + 0xd68]
lea rdi, [rax + rdx*2]
mov eax, dword [rdi + 0xc]
sub esi, eax
cmp esi, dword [r12 + 0x11a0]
mov dword [rsp + 0x60], esi
jae 0x40894a
sub eax, dword [rsp + 0x50]
mov r9d, r14d
mov rsi, qword [rsp + 0x40]
cdq
and edx, dword [rsi + 0x20]
lea ebx, [rdx + rax]
add rbx, qword [rsp + 0x48]
cmp r13d, r14d
cmovle r9d, r13d
mov r8d, r9d
lea r10, [r15 + r8]
add r8, rbx
mov rdx, qword [r10]
mov rcx, qword [r8]
cmp rdx, rcx
jne 0x408e30
lea eax, [r9 + 8]
cmp eax, 0x88
ja 0x408b30
mov eax, pe_nt_image_headers64
sub eax, r9d
shr eax, 3
lea rsi, [rax*8 + 0x10]
mov eax, 8
jmp 0x408a7d
add rax, 8
cmp rsi, rax
je 0x408b30
mov rdx, qword [r10 + rax]
lea r11d, [r9 + rax]
mov rcx, qword [r8 + rax]
cmp rdx, rcx
je 0x408a70
xor rdx, rcx
bsf rdx, rdx
mov esi, 0x89
sar edx, 3
lea eax, [rdx + r11]
cmp eax, 0x89
cmovg eax, esi
cmp dword [rsp + 0x34], eax
jae 0x408b0b
mov edx, dword [rsp + 0x3c]
lea r9d, [rax - 1]
mov esi, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x68]
movzx r11d, byte [rdi + 0x11]
lea r8d, [rdx + 1]
shl rdx, 4
sub ecx, dword [rdi + 8]
cmp eax, 0x88
movzx r10d, byte [rdi + 0x10]
mov dword [rsp + rdx + 0x78], esi
mov esi, dword [rsp + 0x60]
mov word [rsp + rdx + 0x74], r9w
mov byte [rsp + rdx + 0x77], r11b
mov dword [rsp + rdx + 0x7c], ecx
mov byte [rsp + rdx + 0x76], r10b
mov dword [rsp + rdx + 0x80], esi
mov dword [rsp + 0x3c], r8d
ja 0x4084f0
mov dword [rsp + 0x34], eax
mov edx, eax
mov r8d, dword [rdi + 4]
movzx ecx, byte [r15 + rdx]
cmp cl, byte [rbx + rdx]
cmovb r8d, dword [rdi]
cmovae r14d, eax
cmovb r13d, eax
jmp 0x408930
mov eax, 0x89
jmp 0x408aa9
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x38]
mov r8d, r14d
mov edx, 2
mov r15, qword [rsp + 0x50]
mov rcx, r12
mov r9d, dword [rsp + 0x34]
mov dword [rsp + 0x20], eax
add r15, 0x10
call fcn.00411850
cmp qword [rsp + 0x58], r15
je 0x408c30
mov r10d, dword [r12 + 0x88]
jmp 0x408560
cmp al, r14b
movzx edx, al
jae 0x408c00
mov eax, r14d
mov edi, 0x1f
sub eax, edx
bsr eax, eax
xor eax, 0x1f
sub edi, eax
mov eax, edi
or eax, 0x20
jmp 0x408733
mov rcx, qword [0x0042cea0]
mov dword [rsp + 0x68], r10d
mov dword [rsp + 0x50], r11d
mov dword [rsp + 0x48], r8d
mov qword [rsp + 0x40], r9
call fcn.0041de60
mov r10d, dword [rsp + 0x68]
mov r11d, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
jmp 0x4086ab
mov eax, edx
mov edi, 0x1f
sub eax, r14d
mov r14d, edx
add eax, 1
bsr eax, eax
xor eax, 0x1f
sub edi, eax
mov eax, edi
or eax, 0x28
jmp 0x408733
add rsp, 0x908
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, qword [rcx + 1]
mov r9d, 9
mov r11, qword [r8 + 1]
cmp r11, rsi
je 0x408c81
jmp 0x409028
add r9, 8
cmp r9, 0x89
je 0x408e65
mov r11, qword [rcx + r9]
mov edi, r9d
mov rsi, qword [r8 + r9]
cmp r11, rsi
je 0x408c70
xor r11, rsi
bsf rcx, r11
sar ecx, 3
add edi, ecx
cmp edi, ebp
jbe 0x4084d2
mov ecx, dword [rsp + 0x3c]
lea r8d, [rdi - 1]
mov ebp, edi
mov rsi, rcx
shl rcx, 4
mov byte [rsp + rcx + 0x76], dl
mov edx, eax
or edx, 0x80000000
mov word [rsp + rcx + 0x74], r8w
mov dword [rsp + rcx + 0x78], edx
mov edx, dword [rsp + 0x38]
mov byte [rsp + rcx + 0x77], 0
mov dword [rsp + rcx + 0x7c], r14d
sub edx, ebx
lea ebx, [rsi + 1]
mov dword [rsp + rcx + 0x80], edx
mov dword [rsp + 0x3c], ebx
jmp 0x4084d2
shl edx, 8
mov r9d, dword [r12 + 0x1198]
mov eax, edx
shr edx, 0x10
xor eax, 0x3d
xor edx, eax
lea eax, [rdx + rdx*8]
mov edx, eax
shr edx, 4
xor eax, edx
imul edx, eax, 0x27d4eb2d
mov eax, edx
shr eax, 0xf
xor eax, edx
mov rdx, qword [r12 + 0xd78]
shr eax, 0xc
cmp edi, 1
mov edx, dword [rdx + rax*4]
mov eax, dword [r12 + 0x1194]
je 0x408e6f
mov dword [rsp + 0x34], 2
sub eax, edx
cmp eax, r9d
jae 0x40891d
cmp r11d, edx
je 0x40891d
sub edx, dword [r12 + 0x1190]
mov r9d, dword [rsp + 0x38]
mov r10d, edx
sar r10d, 0x1f
and r10d, dword [r12 + 0x119c]
lea eax, [r10 + rdx]
lea rdx, [rax + rax*8]
mov r10, rax
mov rax, qword [r12 + 0xd68]
lea r8, [rax + rdx*2]
mov eax, dword [r8 + 0xc]
sub r9d, eax
cmp r9d, dword [r12 + 0x11a0]
jae 0x40891d
sub eax, dword [rsp + 0x50]
mov rdi, qword [rsp + 0x40]
mov rdx, qword [r15]
mov ecx, eax
sar ecx, 0x1f
and ecx, dword [rdi + 0x20]
mov rdi, qword [rsp + 0x48]
add eax, ecx
mov rax, qword [rdi + rax]
cmp rdx, rax
je 0x408dd3
xor rax, rdx
bsf rax, rax
cmp eax, 0x17
jle 0x40891d
mov eax, dword [rsp + 0x3c]
mov ebx, 2
mov dword [rsp + 0x34], 3
movzx ecx, byte [r8 + 0x11]
mov edx, dword [rsp + 0x68]
sub edx, dword [r8 + 8]
movzx r8d, byte [r8 + 0x10]
mov rdi, rax
shl rax, 4
mov word [rsp + rax + 0x74], bx
mov byte [rsp + rax + 0x77], cl
mov dword [rsp + rax + 0x78], r10d
mov byte [rsp + rax + 0x76], r8b
mov dword [rsp + rax + 0x7c], edx
mov dword [rsp + rax + 0x80], r9d
lea eax, [rdi + 1]
mov dword [rsp + 0x3c], eax
jmp 0x40891d
xor rdx, rcx
mov r11d, r9d
jmp 0x408a91
mov eax, dword [rsp + 0x38]
lea rcx, [r12 + 0xd60]
mov dword [r12 + 0x11a4], eax
call fcn.00414f70
mov eax, dword [r12 + 0x88]
mov dword [rsp + 0x6c], eax
jmp 0x40889b
mov edi, 0x89
jmp 0x408c9d
movzx r8d, word [r15]
mov rcx, qword [r12 + 0xd70]
mov ecx, dword [rcx + r8*4]
mov r8d, eax
sub r8d, ecx
cmp r8d, r9d
jae 0x408d43
cmp edx, ecx
je 0x408d43
cmp r11d, ecx
je 0x408d43
sub ecx, dword [r12 + 0x1190]
mov r8d, ecx
sar r8d, 0x1f
and r8d, dword [r12 + 0x119c]
add ecx, r8d
lea r8, [rcx + rcx*8]
mov r10, rcx
mov rcx, qword [r12 + 0xd68]
lea rcx, [rcx + r8*2]
mov r8d, dword [rsp + 0x38]
sub r8d, dword [rcx + 0xc]
cmp r8d, dword [r12 + 0x11a0]
jae 0x408d43
mov edi, r14d
movzx esi, byte [rcx + 0x11]
mov ebp, 1
mov dword [rsp + 0x34], 2
sub edi, dword [rcx + 8]
movzx ebx, byte [rcx + 0x10]
mov ecx, dword [rsp + 0x3c]
mov r14, rcx
shl rcx, 4
mov dword [rsp + rcx + 0x7c], edi
lea edi, [r14 + 1]
mov word [rsp + rcx + 0x74], bp
mov byte [rsp + rcx + 0x76], bl
mov byte [rsp + rcx + 0x77], sil
mov dword [rsp + rcx + 0x78], r10d
mov dword [rsp + rcx + 0x80], r8d
mov dword [rsp + 0x3c], edi
jmp 0x408d43
mov qword [rsp + 0x48], 9
mov rdi, qword [rcx + 1]
mov rsi, qword [rbx + 1]
cmp rsi, rdi
jne 0x40904d
mov qword [rsp + 0x48], r10
mov edi, dword [rsp + 0x34]
mov esi, 9
mov dword [rsp + 0x50], r14d
mov dword [rsp + 0x58], eax
jmp 0x408f81
add rsi, 8
cmp rsi, 0x89
je 0x40900f
mov rax, qword [rcx + rsi]
mov r10, qword [rbx + rsi]
cmp rax, r10
je 0x408f70
mov rbx, r10
mov dword [rsp + 0x34], edi
mov r10, qword [rsp + 0x48]
mov rdi, rax
mov r14d, dword [rsp + 0x50]
xor rdi, rbx
mov eax, dword [rsp + 0x58]
mov rbx, rdi
bsf rbx, rbx
sar ebx, 3
add ebx, esi
mov edi, ebx
cmp edi, ebp
jbe 0x408870
mov esi, dword [rsp + 0x3c]
lea ebx, [rdi - 1]
mov ebp, edi
mov edi, dword [rsp + 0x40]
shl rsi, 4
or edi, 0x80000000
mov word [rsp + rsi + 0x74], bx
lea ebx, [rdx - 1]
mov dword [rsp + rsi + 0x78], edi
mov edi, dword [rsp + 0x38]
mov byte [rsp + rsi + 0x76], bl
sub edi, dword [rsp + 0x34]
mov ebx, dword [rsp + 0x3c]
mov byte [rsp + rsi + 0x77], 0
mov dword [rsp + rsi + 0x7c], r14d
mov dword [rsp + rsi + 0x80], edi
lea edi, [rbx + 1]
mov dword [rsp + 0x3c], edi
jmp 0x408870
mov dword [rsp + 0x34], edi
mov r10, qword [rsp + 0x48]
mov edi, 0x89
mov r14d, dword [rsp + 0x50]
mov eax, dword [rsp + 0x58]
jmp 0x408fb7
xor r11, rsi
mov edi, 1
jmp 0x408c94
mov dword [rsp + 0x3c], 0
xor r14d, r14d
mov dword [rsp + 0x34], 1
jmp 0x408884
mov rbx, rsi
mov esi, 1
xor rbx, rdi
jmp 0x408fac