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

Disassembly:
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
test rcx, rcx
mov ebx, edx
mov r14, rcx
je 0x406cb8
mov rdi, qword [rcx + 0x20]
test rdi, rdi
je 0x406cb8
cmp qword [rcx + 0x10], 0
je 0x406cb8
cmp qword [rcx], 0
jne 0x406c0e
cmp dword [rcx + 8], 0
jne 0x406cb8
cmp dword [rdi], 0xb
jne 0x406c19
mov dword [rdi], 0xc
mov r9d, dword [rcx + 0x18]
mov r13d, dword [rcx + 8]
mov r11, qword [rcx + 0x10]
mov r15, qword [rcx]
xor eax, eax
mov dword [rsp + 0x38], r13d
mov r8d, r9d
mov dword [rsp + 0xb0], r9d
mov dword [rsp + 0x34], eax
mov r12d, 0xffffffff
mov esi, dword [rdi + 0x44]
mov ebp, dword [rdi + 0x40]
mov r10d, 1
mov dword [rsp + 0xa0], r9d
mov qword [rsp + 0x40], r11
lea rdx, [0x005b9f88]
mov ecx, dword [rdi]
cmp ecx, 0xe
jg 0x4074e0
je 0x4072bd
cmp ecx, 7
jg 0x407245
je 0x407027
test ecx, ecx
je 0x4070aa
dec ecx
je 0x406cea
dec ecx
je 0x406d7c
dec ecx
je 0x406e04
dec ecx
je 0x406e66
dec ecx
je 0x406e84
dec ecx
je 0x406f8d
mov eax, 0xfffffffe
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x10
jb 0x406cce
cmp bpl, 8
mov dword [rdi + 0x10], ebp
jne 0x4071ea
test ebp, 0xe000
jne 0x4071ea
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x406d1b
mov eax, ebp
shr eax, 8
and eax, r10d
mov dword [rcx], eax
bt dword [rdi + 0x10], 9
jae 0x406d54
mov byte [rsp + 0xb8], bpl
shr ebp, 8
lea rdx, [rsp + 0xb8]
mov byte [rsp + 0xb9], bpl
mov ecx, dword [rdi + 0x18]
mov r8d, 2
call fcn.00406404
mov r10d, 1
mov dword [rdi + 0x18], eax
xor ebp, ebp
mov dword [rdi], 2
xor esi, esi
jmp 0x406d7c
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x20
jb 0x406d60
mov rax, qword [rdi + 0x20]
test rax, rax
je 0x406d8d
mov dword [rax + 4], ebp
bt dword [rdi + 0x10], 9
jae 0x406dd8
mov eax, ebp
mov byte [rsp + 0xb8], bpl
lea rdx, [rsp + 0xb8]
shr eax, 8
mov r8d, 4
mov byte [rsp + 0xb9], al
mov eax, ebp
shr ebp, 0x18
shr eax, 0x10
mov byte [rsp + 0xbb], bpl
mov byte [rsp + 0xba], al
mov ecx, dword [rdi + 0x18]
call fcn.00406404
mov dword [rdi + 0x18], eax
xor ebp, ebp
mov dword [rdi], 3
xor esi, esi
lea r10d, [rbp + 1]
jmp 0x406e04
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x10
jb 0x406de8
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x406e25
movzx eax, bpl
mov dword [rcx + 8], eax
mov rax, qword [rdi + 0x20]
mov ecx, ebp
shr ecx, 8
mov dword [rax + 0xc], ecx
bt dword [rdi + 0x10], 9
jae 0x406e58
mov byte [rsp + 0xb8], bpl
shr ebp, 8
lea rdx, [rsp + 0xb8]
mov byte [rsp + 0xb9], bpl
mov ecx, dword [rdi + 0x18]
mov r8d, 2
call fcn.00406404
mov dword [rdi + 0x18], eax
xor ebp, ebp
mov dword [rdi], 4
xor esi, esi
lea r10d, [rbp + 1]
bt dword [rdi + 0x10], 0xa
jb 0x406eeb
mov rax, qword [rdi + 0x20]
test rax, rax
je 0x406e7e
mov qword [rax + 0x10], 0
mov dword [rdi], 5
bt dword [rdi + 0x10], 0xa
jae 0x406f7a
mov ebx, dword [rdi + 0x48]
cmp ebx, r13d
cmova ebx, r13d
test ebx, ebx
je 0x406f70
mov rax, qword [rdi + 0x20]
test rax, rax
je 0x406f4d
mov r9, qword [rax + 0x10]
test r9, r9
je 0x406f4d
mov edx, dword [rax + 0x18]
mov ecx, dword [rax + 0x1c]
sub edx, dword [rdi + 0x48]
lea eax, [rbx + rdx]
cmp eax, ecx
jbe 0x406f3b
sub ecx, edx
jmp 0x406f3d
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x10
jb 0x406ecf
mov rax, qword [rdi + 0x20]
mov dword [rdi + 0x48], ebp
test rax, rax
je 0x406eff
mov dword [rax + 0x18], ebp
bt dword [rdi + 0x10], 9
jae 0x406f32
mov byte [rsp + 0xb8], bpl
shr ebp, 8
lea rdx, [rsp + 0xb8]
mov byte [rsp + 0xb9], bpl
mov ecx, dword [rdi + 0x18]
mov r8d, 2
call fcn.00406404
mov dword [rdi + 0x18], eax
xor ebp, ebp
xor esi, esi
jmp 0x406e7e
mov ecx, ebx
mov r8d, ecx
mov ecx, edx
mov rdx, r15
add rcx, r9
call fcn.00553680
bt dword [rdi + 0x10], 9
jae 0x406f65
mov ecx, dword [rdi + 0x18]
mov r8d, ebx
mov rdx, r15
call fcn.00406404
mov dword [rdi + 0x18], eax
mov eax, ebx
sub r13d, ebx
add r15, rax
sub dword [rdi + 0x48], ebx
cmp dword [rdi + 0x48], 0
jne 0x407f06
mov dword [rdi + 0x48], 0
mov dword [rdi], 6
mov r10d, 1
bt dword [rdi + 0x10], 0xb
jae 0x407009
test r13d, r13d
je 0x407f06
xor ebx, ebx
mov r8, r15
mov rax, qword [rdi + 0x20]
movzx r12d, byte [r8]
add ebx, r10d
add r8, r10
test rax, rax
je 0x406fce
mov rdx, qword [rax + 0x20]
test rdx, rdx
je 0x406fce
mov ecx, dword [rdi + 0x48]
cmp ecx, dword [rax + 0x28]
jae 0x406fce
mov byte [rcx + rdx], r12b
add dword [rdi + 0x48], r10d
test r12d, r12d
je 0x406fd8
cmp ebx, r13d
jb 0x406fa2
bt dword [rdi + 0x10], 9
jae 0x406ff6
mov ecx, dword [rdi + 0x18]
mov r8d, ebx
mov rdx, r15
call fcn.00406404
mov r10d, 1
mov dword [rdi + 0x18], eax
mov eax, ebx
sub r13d, ebx
add r15, rax
test r12d, r12d
jne 0x407f06
jmp 0x40701a
mov rax, qword [rdi + 0x20]
test rax, rax
je 0x40701a
mov qword [rax + 0x20], 0
mov dword [rdi + 0x48], 0
mov dword [rdi], 7
bt dword [rdi + 0x10], 0xc
jae 0x4071f5
test r13d, r13d
je 0x407f06
xor ebx, ebx
mov r8, r15
mov rax, qword [rdi + 0x20]
movzx r12d, byte [r8]
add ebx, r10d
add r8, r10
test rax, rax
je 0x40706c
mov rdx, qword [rax + 0x30]
test rdx, rdx
je 0x40706c
mov ecx, dword [rdi + 0x48]
cmp ecx, dword [rax + 0x38]
jae 0x40706c
mov byte [rcx + rdx], r12b
add dword [rdi + 0x48], r10d
test r12d, r12d
je 0x407076
cmp ebx, r13d
jb 0x407040
bt dword [rdi + 0x10], 9
jae 0x407094
mov ecx, dword [rdi + 0x18]
mov r8d, ebx
mov rdx, r15
call fcn.00406404
mov r10d, 1
mov dword [rdi + 0x18], eax
mov eax, ebx
sub r13d, ebx
add r15, rax
test r12d, r12d
jne 0x407f06
jmp 0x407206
cmp dword [rdi + 8], 0
jne 0x4070d7
mov dword [rdi], 0xc
jmp 0x406c64
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x10
jb 0x4070bb
test byte [rdi + 8], 2
je 0x407147
cmp ebp, 0x8b1f
jne 0x407147
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.00406404
lea rdx, [rsp + 0xb8]
mov r8d, 2
mov dword [rdi + 0x18], eax
mov byte [rsp + 0xb8], 0x1f
mov byte [rsp + 0xb9], 0x8b
mov ecx, dword [rdi + 0x18]
call fcn.00406404
xor ebp, ebp
xor esi, esi
lea r10d, [rbp + 1]
mov dword [rdi + 0x18], eax
mov dword [rdi], r10d
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
mov r11, qword [rsp + 0x40]
jmp 0x406c5d
mov rax, qword [rdi + 0x20]
mov dword [rdi + 0x10], 0
test rax, rax
je 0x40715e
mov dword [rax + 0x40], 0xffffffff
test byte [rdi + 8], r10b
je 0x4071ea
movzx ecx, bpl
mov eax, ebp
shr eax, 8
shl ecx, 8
add ecx, eax
mov eax, 0x8421085
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 4
imul eax, eax, 0x1f
cmp ecx, eax
jne 0x4071e3
mov eax, ebp
and al, 0xf
cmp al, 8
jne 0x407d2f
shr ebp, 4
add esi, 0xfffffffc
mov ecx, ebp
and ecx, 0xf
add ecx, 8
cmp ecx, dword [rdi + 0x28]
ja 0x407d2f
mov eax, r10d
xor r8d, r8d
xor edx, edx
shl eax, cl
xor ecx, ecx
mov dword [rdi + 0x14], eax
call fcn.00406134
shr ebp, 8
not ebp
mov dword [rdi + 0x18], eax
mov dword [r14 + 0x2c], eax
and ebp, 2
or ebp, 9
mov dword [rdi], ebp
xor ebp, ebp
xor esi, esi
jmp 0x407655
lea rdx, [0x005b9f88]
mov dword [rdi], 0x1b
jmp 0x406c64
mov rax, qword [rdi + 0x20]
test rax, rax
je 0x407206
mov qword [rax + 0x30], 0
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
mov r11, qword [rsp + 0x40]
mov ebx, dword [rsp + 0xa8]
mov dword [rdi], 8
mov r12d, 0xffffffff
lea rdx, [0x005b9f88]
bt dword [rdi + 0x10], 9
jae 0x407494
jmp 0x40747f
sub ecx, 8
je 0x407235
dec ecx
je 0x40734a
dec ecx
je 0x407383
dec ecx
je 0x4073c8
dec ecx
je 0x4073d1
dec ecx
jne 0x406cb8
mov ecx, esi
and ecx, 7
shr ebp, cl
sub esi, ecx
jmp 0x407299
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x20
jb 0x40727d
mov eax, ebp
movzx ecx, bp
not eax
shr eax, 0x10
cmp ecx, eax
jne 0x4071ea
xor ebp, ebp
mov dword [rdi + 0x48], ecx
mov dword [rdi], 0xe
xor esi, esi
mov r12d, dword [rdi + 0x48]
test r12d, r12d
je 0x4074cf
cmp r12d, r13d
cmova r12d, r13d
cmp r12d, r9d
cmova r12d, r9d
test r12d, r12d
je 0x407f06
mov r8d, r12d
mov rdx, r15
mov rcx, r11
mov ebx, r12d
call fcn.00553680
mov r9d, dword [rsp + 0xa0]
mov r11, qword [rsp + 0x40]
sub r9d, r12d
add r15, rbx
add r11, rbx
mov ebx, dword [rsp + 0xa8]
sub r13d, r12d
sub dword [rdi + 0x48], r12d
mov dword [rsp + 0xa0], r9d
mov r10d, 1
mov qword [rsp + 0x40], r11
jmp 0x407ca0
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x20
jb 0x40732e
mov ecx, ebp
mov eax, ebp
shl eax, 0x10
and ecx, 0xff00
add ecx, eax
mov eax, ebp
shr ebp, 0x18
shr eax, 8
shl ecx, 8
and eax, 0xff00
add eax, ecx
add eax, ebp
xor ebp, ebp
xor esi, esi
mov dword [rdi + 0x18], eax
mov dword [r14 + 0x2c], eax
mov dword [rdi], 0xa
cmp dword [rdi + 0xc], 0
je 0x407fed
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.00406134
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
mov r11, qword [rsp + 0x40]
mov dword [rdi + 0x18], eax
mov dword [r14 + 0x2c], eax
mov dword [rdi], 0xb
mov r10d, 1
lea rdx, [0x005b9f88]
cmp ebx, 5
je 0x407f06
cmp dword [rdi + 4], 0
je 0x407407
mov ecx, esi
mov dword [rdi], 0x18
and ecx, 7
shr ebp, cl
sub esi, ecx
jmp 0x406c64
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 3
jb 0x4073eb
mov eax, ebp
shr ebp, 1
add esi, r12d
and eax, r10d
mov dword [rdi + 4], eax
mov eax, ebp
and eax, 3
je 0x407452
dec eax
je 0x40743c
dec eax
je 0x407434
dec eax
jne 0x407458
mov dword [rdi], 0x1b
jmp 0x407458
mov dword [rdi], 0xf
jmp 0x407458
mov rcx, rdi
call fcn.00406a7c
mov dword [rdi], 0x12
mov r10d, 1
jmp 0x407458
mov dword [rdi], 0xd
shr ebp, 2
add esi, 0xfffffffe
jmp 0x40712d
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x10
jb 0x407463
movzx eax, word [rdi + 0x18]
cmp ebp, eax
jne 0x4071ea
xor ebp, ebp
xor esi, esi
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x4074b1
mov eax, dword [rdi + 0x10]
sar eax, 9
and eax, r10d
mov dword [rcx + 0x3c], eax
mov rax, qword [rdi + 0x20]
mov dword [rax + 0x40], r10d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.00406404
mov dword [rdi + 0x18], eax
mov dword [r14 + 0x2c], eax
mov dword [rdi], 0xb
jmp 0x407655
mov dword [rdi], 0xb
mov r12d, 0xffffffff
jmp 0x406c64
cmp ecx, 0x16
jg 0x407dcb
je 0x407d40
sub ecx, 0xf
je 0x407545
dec ecx
je 0x4075e0
dec ecx
je 0x407838
dec ecx
je 0x40796b
dec ecx
je 0x407b21
dec ecx
je 0x407b66
dec ecx
jne 0x406cb8
jmp 0x407ce2
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0xe
jb 0x407529
mov eax, ebp
shr ebp, 5
add esi, 0xfffffff2
and eax, 0x1f
add eax, 0x101
mov dword [rdi + 0x74], eax
mov eax, ebp
shr ebp, 5
and eax, 0x1f
add eax, r10d
mov dword [rdi + 0x78], eax
mov eax, ebp
shr ebp, 4
and eax, 0xf
add eax, 4
cmp dword [rdi + 0x74], 0x11e
mov dword [rdi + 0x70], eax
ja 0x4071ea
cmp dword [rdi + 0x78], 0x1e
ja 0x4071ea
mov dword [rdi + 0x7c], 0
mov dword [rdi], 0x10
jmp 0x4075e0
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 3
jb 0x40759f
mov eax, dword [rdi + 0x7c]
mov cl, bpl
shr ebp, 3
movzx eax, word [rdx + rax*2]
and cx, 7
mov word [rdi + rax*2 + 0x88], cx
add dword [rdi + 0x7c], r10d
add esi, 0xfffffffd
mov eax, dword [rdi + 0x70]
cmp dword [rdi + 0x7c], eax
jb 0x4075bb
jmp 0x4075ff
mov eax, dword [rdi + 0x7c]
movzx eax, word [rdx + rax*2]
mov word [rdi + rax*2 + 0x88], 0
add dword [rdi + 0x7c], r10d
cmp dword [rdi + 0x7c], 0x13
jb 0x4075ea
lea rcx, [rdi + 0x68]
lea rax, [rdi + 0x548]
lea r9, [rdi + 0x80]
mov qword [r9], rax
mov qword [rdi + 0x58], rax
lea rax, [rdi + 0x308]
mov qword [rsp + 0x28], rax
mov dword [rcx], 7
mov qword [rsp + 0x20], rcx
xor ecx, ecx
lea rdx, [rdi + 0x88]
lea r8d, [rcx + 0x13]
call fcn.00408160
test eax, eax
mov dword [rsp + 0x34], eax
je 0x407660
mov dword [rdi], 0x1b
mov r10d, 1
jmp 0x40712d
mov r11, qword [rsp + 0x40]
mov dword [rdi + 0x7c], 0
mov dword [rdi], 0x11
mov r10d, 1
jmp 0x407838
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
mov ecx, dword [rdi + 0x68]
mov eax, r10d
shl eax, cl
sub eax, r10d
mov ecx, eax
mov eax, ebp
and rcx, rax
mov rax, qword [rdi + 0x58]
mov eax, dword [rax + rcx*4]
mov ecx, eax
mov dword [rsp + 0x30], eax
shr ecx, 8
movzx ecx, cl
cmp ecx, esi
ja 0x40767d
mov ecx, eax
shr ecx, 0x10
cmp cx, 0x10
jae 0x40771e
shr eax, 8
movzx ecx, al
cmp esi, ecx
jae 0x4076fc
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add esi, 8
shl eax, cl
add r13d, r12d
add r15, r10
add ebp, eax
movzx eax, byte [rsp + 0x31]
cmp esi, eax
jb 0x4076d7
movzx ecx, byte [rsp + 0x31]
movzx eax, word [rsp + 0x32]
shr ebp, cl
sub esi, ecx
mov ecx, dword [rdi + 0x7c]
mov word [rdi + rcx*2 + 0x88], ax
add dword [rdi + 0x7c], r10d
jmp 0x407838
cmp word [rsp + 0x32], 0x10
jne 0x407781
movzx edx, byte [rsp + 0x31]
lea r8d, [rdx + 2]
jmp 0x40774d
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, r8d
jb 0x407731
mov eax, dword [rdi + 0x7c]
mov ecx, edx
sub esi, edx
shr ebp, cl
test eax, eax
je 0x407849
mov edx, ebp
dec eax
shr ebp, 2
movzx r9d, word [rdi + rax*2 + 0x88]
and edx, 3
add edx, 3
add esi, 0xfffffffe
jmp 0x40780f
cmp word [rsp + 0x32], 0x11
movzx r8d, byte [rsp + 0x31]
jne 0x4077cc
lea edx, [r8 + 3]
jmp 0x4077b1
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, edx
jb 0x407795
mov ecx, r8d
mov eax, 0xfffffffd
shr ebp, cl
mov edx, ebp
and edx, 7
add edx, 3
shr ebp, 3
jmp 0x407807
lea edx, [r8 + 7]
jmp 0x4077ee
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, edx
jb 0x4077d2
mov ecx, r8d
mov eax, 0xfffffff9
shr ebp, cl
mov edx, ebp
and edx, 0x7f
add edx, 0xb
shr ebp, 7
sub eax, r8d
xor r9d, r9d
add esi, eax
mov eax, dword [rdi + 0x7c]
lea ecx, [rdx + rax]
mov eax, dword [rdi + 0x78]
add eax, dword [rdi + 0x74]
cmp ecx, eax
ja 0x407864
test edx, edx
je 0x407838
mov eax, dword [rdi + 0x7c]
mov word [rdi + rax*2 + 0x88], r9w
add dword [rdi + 0x7c], r10d
add edx, r12d
jne 0x407823
mov eax, dword [rdi + 0x78]
add eax, dword [rdi + 0x74]
cmp dword [rdi + 0x7c], eax
jb 0x407699
jmp 0x40786a
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
mov dword [rdi], 0x1b
jmp 0x406c5d
mov dword [rdi], 0x1b
cmp dword [rdi], 0x1b
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
lea rdx, [0x005b9f88]
je 0x406c64
mov r8d, dword [rdi + 0x74]
lea rax, [rdi + 0x548]
lea r12, [rdi + 0x308]
mov qword [rdi + 0x80], rax
mov qword [rdi + 0x58], rax
lea rax, [rdi + 0x68]
lea rdx, [rdi + 0x88]
lea r9, [rdi + 0x80]
mov ecx, r10d
mov qword [rsp + 0x28], r12
mov dword [rax], 9
mov qword [rsp + 0x20], rax
call fcn.00408160
test eax, eax
mov dword [rsp + 0x34], eax
je 0x4078eb
mov ebx, dword [rsp + 0xa8]
mov r10d, 1
jmp 0x407c8d
mov rax, qword [rdi + 0x80]
mov r8d, dword [rdi + 0x78]
lea rcx, [rdi + 0x6c]
mov qword [rdi + 0x60], rax
mov eax, dword [rdi + 0x74]
mov dword [rcx], 6
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rcx
lea r9, [rdi + 0x80]
lea rdx, [rdi + rax*2 + 0x88]
mov ecx, 2
call fcn.00408160
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
test eax, eax
mov r11, qword [rsp + 0x40]
mov ebx, dword [rsp + 0xa8]
mov dword [rsp + 0x34], eax
mov r10d, 1
je 0x40795f
mov dword [rdi], 0x1b
jmp 0x407ca8
mov dword [rdi], 0x12
mov r12d, 0xffffffff
cmp r13d, 6
jb 0x4079b6
cmp r9d, 0x102
jb 0x4079b6
mov qword [r14 + 0x10], r11
mov dword [r14 + 0x18], r9d
mov qword [r14], r15
mov dword [r14 + 8], r13d
mov edx, r8d
mov rcx, r14
mov dword [rdi + 0x40], ebp
mov dword [rdi + 0x44], esi
call fcn.00406510
mov r11, qword [r14 + 0x10]
mov r9d, dword [r14 + 0x18]
mov r15, qword [r14]
mov r13d, dword [r14 + 8]
mov r8d, dword [rsp + 0xb0]
jmp 0x406c44
mov ecx, dword [rdi + 0x68]
mov r11, qword [rdi + 0x58]
mov eax, r10d
shl eax, cl
sub eax, r10d
mov ecx, eax
mov eax, ebp
and rcx, rax
mov eax, dword [r11 + rcx*4]
jmp 0x407a07
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
mov ecx, dword [rdi + 0x68]
add r15, r10
add ebp, eax
mov eax, r10d
add esi, 8
shl eax, cl
sub eax, r10d
mov ecx, eax
mov eax, ebp
and rcx, rax
mov rax, qword [rdi + 0x58]
mov eax, dword [rax + rcx*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, esi
ja 0x4079d2
test al, al
je 0x407ad5
test al, 0xf0
jne 0x407ad5
mov r10d, eax
mov cl, al
mov r12d, 1
shr r10d, 8
mov r9d, r12d
mov edx, eax
movzx r8d, r10b
mov dword [rsp + 0x30], eax
shr eax, 0x10
add ecx, r8d
shl r9d, cl
mov ecx, r8d
sub r9d, r12d
and r9d, ebp
shr r9d, cl
add r9d, eax
mov eax, dword [r11 + r9*4]
mov ecx, eax
shr ecx, 8
movzx r8d, cl
movzx ecx, r10b
mov r10, r12
add r8d, ecx
cmp r8d, esi
jbe 0x407acc
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
movzx r9d, byte [rsp + 0x31]
mov ecx, esi
shl eax, cl
mov r8d, r10d
add r13d, 0xffffffff
add ebp, eax
mov al, dl
add r15, r10
lea ecx, [r9 + rax]
movzx eax, word [rsp + 0x32]
add esi, 8
shl r8d, cl
mov ecx, r9d
sub r8d, r10d
and r8d, ebp
shr r8d, cl
add r8d, eax
mov rax, qword [rdi + 0x58]
mov eax, dword [rax + r8*4]
mov ecx, eax
shr ecx, 8
movzx r8d, cl
add r8d, r9d
jmp 0x407a6e
movzx ecx, byte [rsp + 0x31]
shr ebp, cl
sub esi, ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
shr ebp, cl
sub esi, ecx
mov ecx, eax
shr ecx, 0x10
test al, al
mov dword [rdi + 0x48], ecx
jne 0x407af8
mov dword [rdi], 0x17
jmp 0x407c93
test al, 0x20
je 0x407b07
mov dword [rdi], 0xb
jmp 0x407c93
test al, 0x40
jne 0x407c8d
and eax, 0xf
mov dword [rdi], 0x13
mov r12d, 0xffffffff
mov dword [rdi + 0x50], eax
mov edx, dword [rdi + 0x50]
test edx, edx
je 0x407b60
cmp esi, edx
jae 0x407b4d
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add esi, 8
shl eax, cl
add r13d, r12d
add r15, r10
add ebp, eax
cmp esi, dword [rdi + 0x50]
jb 0x407b2c
mov ecx, edx
mov eax, r10d
shl eax, cl
sub eax, r10d
and eax, ebp
shr ebp, cl
add dword [rdi + 0x48], eax
sub esi, edx
mov dword [rdi], 0x14
mov ecx, dword [rdi + 0x6c]
mov r11, qword [rdi + 0x60]
mov eax, r10d
shl eax, cl
sub eax, r10d
mov ecx, eax
mov eax, ebp
and rcx, rax
mov eax, dword [r11 + rcx*4]
jmp 0x407bb7
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
mov ecx, dword [rdi + 0x6c]
add r15, r10
add ebp, eax
mov eax, r10d
add esi, 8
shl eax, cl
sub eax, r10d
mov ecx, eax
mov eax, ebp
and rcx, rax
mov rax, qword [rdi + 0x60]
mov eax, dword [rax + rcx*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, esi
ja 0x407b82
test al, 0xf0
jne 0x407c7d
mov r10d, eax
mov cl, al
mov r12d, 1
shr r10d, 8
mov r9d, r12d
mov edx, eax
movzx r8d, r10b
mov dword [rsp + 0x30], eax
shr eax, 0x10
add ecx, r8d
shl r9d, cl
mov ecx, r8d
sub r9d, r12d
and r9d, ebp
shr r9d, cl
add r9d, eax
mov eax, dword [r11 + r9*4]
mov ecx, eax
shr ecx, 8
movzx r8d, cl
movzx ecx, r10b
mov r10, r12
add r8d, ecx
cmp r8d, esi
jbe 0x407c74
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
movzx r9d, byte [rsp + 0x31]
mov ecx, esi
shl eax, cl
mov r8d, r10d
add r13d, 0xffffffff
add ebp, eax
mov al, dl
add r15, r10
lea ecx, [r9 + rax]
movzx eax, word [rsp + 0x32]
add esi, 8
shl r8d, cl
mov ecx, r9d
sub r8d, r10d
and r8d, ebp
shr r8d, cl
add r8d, eax
mov rax, qword [rdi + 0x60]
mov eax, dword [rax + r8*4]
mov ecx, eax
shr ecx, 8
movzx r8d, cl
add r8d, r9d
jmp 0x407c16
movzx ecx, byte [rsp + 0x31]
shr ebp, cl
sub esi, ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
shr ebp, cl
sub esi, ecx
test al, 0x40
je 0x407cb3
mov dword [rdi], 0x1b
mov r11, qword [rsp + 0x40]
mov r9d, dword [rsp + 0xa0]
mov r8d, dword [rsp + 0xb0]
mov r12d, 0xffffffff
jmp 0x406c5d
mov r8d, dword [rsp + 0xb0]
mov r9d, dword [rsp + 0xa0]
mov r11, qword [rsp + 0x40]
mov ecx, eax
mov dword [rdi], 0x15
mov r12d, 0xffffffff
shr ecx, 0x10
and eax, 0xf
mov dword [rdi + 0x50], eax
mov dword [rdi + 0x4c], ecx
mov edx, dword [rdi + 0x50]
test edx, edx
je 0x407d21
cmp esi, edx
jae 0x407d0e
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add esi, 8
shl eax, cl
add r13d, r12d
add r15, r10
add ebp, eax
cmp esi, dword [rdi + 0x50]
jb 0x407ced
mov ecx, edx
mov eax, r10d
shl eax, cl
sub eax, r10d
and eax, ebp
shr ebp, cl
add dword [rdi + 0x4c], eax
sub esi, edx
mov eax, dword [rdi + 0x30]
sub eax, r9d
add eax, r8d
cmp dword [rdi + 0x4c], eax
jbe 0x407d3a
mov dword [rdi], 0x1b
jmp 0x406c5d
mov dword [rdi], 0x16
test r9d, r9d
je 0x407f06
mov ecx, dword [rdi + 0x4c]
mov eax, r8d
sub eax, r9d
cmp ecx, eax
jbe 0x407d79
sub ecx, eax
mov eax, dword [rdi + 0x34]
cmp ecx, eax
jbe 0x407d68
mov edx, dword [rdi + 0x2c]
sub ecx, eax
sub edx, ecx
jmp 0x407d6c
sub eax, ecx
mov edx, eax
mov eax, dword [rdi + 0x48]
add rdx, qword [rdi + 0x38]
cmp ecx, eax
jbe 0x407d84
jmp 0x407d82
mov eax, dword [rdi + 0x48]
mov rdx, r11
sub rdx, rcx
mov ecx, eax
cmp ecx, r9d
cmova ecx, r9d
sub r9d, ecx
sub eax, ecx
mov dword [rdi + 0x48], eax
mov dword [rsp + 0xa0], r9d
mov al, byte [rdx]
add rdx, r10
mov byte [r11], al
add r11, r10
add ecx, r12d
jne 0x407d9b
cmp dword [rdi + 0x48], ecx
mov qword [rsp + 0x40], r11
lea rdx, [0x005b9f88]
jne 0x406c64
mov dword [rdi], 0x12
jmp 0x406c5d
sub ecx, 0x17
je 0x407fc0
dec ecx
je 0x407dfd
dec ecx
je 0x407ec3
dec ecx
je 0x407f01
dec ecx
je 0x40800c
dec ecx
je 0x4080b8
jmp 0x406cb8
cmp dword [rdi + 8], 0
je 0x407ebd
jmp 0x407e25
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x20
jb 0x407e09
sub r8d, r9d
add dword [r14 + 0x1c], r8d
add dword [rdi + 0x1c], r8d
test r8d, r8d
je 0x407e79
mov ecx, dword [rdi + 0x18]
mov eax, r8d
mov rdx, r11
sub rdx, rax
cmp dword [rdi + 0x10], 0
je 0x407e53
call fcn.00406404
jmp 0x407e58
call fcn.00406134
mov r9d, dword [rsp + 0xa0]
mov r11, qword [rsp + 0x40]
mov dword [rdi + 0x18], eax
mov dword [r14 + 0x2c], eax
mov r10d, 1
lea rdx, [0x005b9f88]
mov ecx, ebp
mov eax, ebp
mov r8d, r9d
shl eax, 0x10
and ecx, 0xff00
mov dword [rsp + 0xb0], r9d
add ecx, eax
mov eax, ebp
shr eax, 8
shl ecx, 8
and eax, 0xff00
add ecx, eax
mov eax, ebp
shr eax, 0x18
add ecx, eax
cmp dword [rdi + 0x10], 0
cmovne ecx, ebp
cmp ecx, dword [rdi + 0x18]
jne 0x4071ea
xor ebp, ebp
xor esi, esi
mov dword [rdi], 0x19
cmp dword [rdi + 8], 0
je 0x407efb
cmp dword [rdi + 0x10], 0
je 0x407efb
jmp 0x407ee9
test r13d, r13d
je 0x407f06
movzx eax, byte [r15]
mov ecx, esi
add r13d, r12d
shl eax, cl
add r15, r10
add ebp, eax
add esi, 8
cmp esi, 0x20
jb 0x407ed1
cmp ebp, dword [rdi + 0x1c]
jne 0x4071ea
xor ebp, ebp
xor esi, esi
mov dword [rdi], 0x1a
mov dword [rsp + 0x34], r10d
mov rax, qword [rsp + 0x40]
mov dword [r14 + 8], r13d
mov r13d, dword [rsp + 0xb0]
mov qword [r14 + 0x10], rax
mov eax, dword [rsp + 0xa0]
mov qword [r14], r15
mov dword [r14 + 0x18], eax
cmp dword [rdi + 0x2c], 0
mov dword [rdi + 0x40], ebp
mov dword [rdi + 0x44], esi
jne 0x407f48
cmp dword [rdi], 0x18
jge 0x408055
cmp r13d, dword [r14 + 0x18]
je 0x408055
mov rbx, qword [r14 + 0x20]
mov r12d, 1
cmp qword [rbx + 0x38], 0
jne 0x407f75
mov ecx, dword [rbx + 0x28]
mov eax, r12d
shl eax, cl
mov ecx, eax
call fcn.004af6ac
test rax, rax
mov qword [rbx + 0x38], rax
je 0x4080b2
cmp dword [rbx + 0x2c], 0
jne 0x407f93
mov ecx, dword [rbx + 0x28]
mov dword [rbx + 0x34], 0
mov dword [rbx + 0x30], 0
shl r12d, cl
mov dword [rbx + 0x2c], r12d
mov esi, dword [rbx + 0x2c]
mov rdx, qword [r14 + 0x10]
mov ebp, r13d
sub ebp, dword [r14 + 0x18]
cmp ebp, esi
jb 0x408019
mov rcx, qword [rbx + 0x38]
mov r8, rsi
sub rdx, rsi
call fcn.00553680
mov dword [rbx + 0x34], 0
jmp 0x40804f
test r9d, r9d
je 0x407f06
mov al, byte [rdi + 0x48]
mov byte [r11], al
add r11, r10
add r9d, r12d
mov dword [rsp + 0xa0], r9d
mov qword [rsp + 0x40], r11
mov dword [rdi], 0x12
jmp 0x406c64
mov qword [r14 + 0x10], r11
mov dword [r14 + 0x18], r9d
mov qword [r14], r15
mov dword [r14 + 8], r13d
mov eax, 2
mov dword [rdi + 0x40], ebp
mov dword [rdi + 0x44], esi
jmp 0x406cbd
mov dword [rsp + 0x34], 0xfffffffd
jmp 0x407f06
sub esi, dword [rbx + 0x34]
mov ecx, dword [rbx + 0x34]
mov eax, ebp
cmp esi, ebp
cmova esi, ebp
add rcx, qword [rbx + 0x38]
sub rdx, rax
mov r8d, esi
call fcn.00553680
sub ebp, esi
je 0x408095
mov rdx, qword [r14 + 0x10]
mov rcx, qword [rbx + 0x38]
mov r8d, ebp
sub rdx, r8
call fcn.00553680
mov dword [rbx + 0x34], ebp
mov eax, dword [rbx + 0x2c]
mov dword [rbx + 0x30], eax
sub r13d, dword [r14 + 0x18]
mov ebx, dword [rsp + 0x38]
sub ebx, dword [r14 + 8]
add dword [r14 + 0x1c], r13d
add dword [r14 + 0xc], ebx
add dword [rdi + 0x1c], r13d
cmp dword [rdi + 8], 0
je 0x4080ce
test r13d, r13d
je 0x4080ce
mov rdx, qword [r14 + 0x10]
mov ecx, dword [rdi + 0x18]
mov eax, r13d
sub rdx, rax
cmp dword [rdi + 0x10], 0
mov r8d, r13d
je 0x4080c2
call fcn.00406404
jmp 0x4080c7
mov ecx, dword [rbx + 0x2c]
add dword [rbx + 0x34], esi
cmp dword [rbx + 0x34], ecx
jne 0x4080a7
mov dword [rbx + 0x34], 0
mov eax, dword [rbx + 0x30]
cmp eax, ecx
jae 0x408055
add eax, esi
jmp 0x408052
mov dword [rdi], 0x1c
mov eax, 0xfffffffc
jmp 0x406cbd
call fcn.00406134
mov dword [rdi + 0x18], eax
mov dword [r14 + 0x2c], eax
mov eax, dword [rdi + 4]
mov edx, pe_nt_image_headers64
neg eax
sbb ecx, ecx
xor eax, eax
and ecx, 0x40
cmp dword [rdi], 0xb
cmove eax, edx
add ecx, eax
add ecx, dword [rdi + 0x44]
test ebx, ebx
mov dword [r14 + 0x28], ecx
jne 0x4080f7
test r13d, r13d
je 0x408101
cmp dword [rsp + 0xa8], 4
jne 0x408114
mov eax, dword [rsp + 0x34]
mov ecx, 0xfffffffb
test eax, eax
cmove eax, ecx
jmp 0x406cbd
mov eax, dword [rsp + 0x34]
jmp 0x406cbd