Function at 0x140050870
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xbd8
lea rax, [rdx + 2]
mov rbp, r9
mov qword [rsp + 0x160], r9
mov qword [rsp + 0x140], r9
mov r9, qword [rsp + 0xc40]
xor r11d, r11d
mov qword [rsp + 0x198], rax
mov r15, r8
mov qword [rsp + 0x98], r8
mov r10, rcx
lea rax, [0x1401175e8]
cmp r9, r11
jne 0x1400508e2
cmp qword [rcx + 0x10], 0x3f
jne 0x1400508e2
mov byte [rsp + 0xc20], 1
jmp 0x1400508ef
mov byte [rsp + 0xc20], r11b
cmp r9, r11
jne 0x1400508fa
mov r9, rax
mov qword [rsp + 0xc40], rax
mov rax, qword [rcx]
cmp qword [r10 + 0x10], 0x3f
mov rcx, qword [rcx + 8]
mov qword [rsp + 0xa8], rax
mov rax, r11
sete al
mov qword [rsp + 0xe0], rcx
mov rcx, r11
mov qword [rsp + 0x68], rax
mov al, byte [r10 + 0x10]
mov qword [rsp + 0x78], r11
cmp al, 0x74
sete cl
mov qword [rsp + 0x130], rcx
cmp al, 0x73
je 0x140050947
cmp al, 0x31
je 0x140050947
mov eax, r11d
jmp 0x14005094a
movsx eax, al
mov ebx, dword [r10 + 0x28]
cdqe
lea rcx, [rsp + 0x90]
mov qword [rsp + 0x168], rax
mov eax, ebx
mov r12d, ebx
and eax, 1
mov edi, ebx
mov r13d, ebx
mov dword [rsp + 0x38], eax
mov eax, dword [r10 + 0x50]
mov edx, 0x3b
and r12d, 2
and edi, 4
and r13d, 0x10
mov dword [rsp + 0x88], eax
and ebx, 0x20
mov qword [rsp + 0x90], r9
mov qword [rsp + 0x40], r11
call fcn.1400e4d6c
mov rcx, qword [rsp + 0x90]
cmp word [rcx], r11w
je 0x1400509d7
mov word [rcx], r11w
mov rcx, qword [rsp + 0x90]
mov r15, qword [rsp + 0xc30]
add rcx, 2
mov qword [rsp + 0x98], r15
mov qword [rsp + 0x90], rcx
cmp word [r15], r11w
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x40]
setne byte [rsp + 0xc38]
call fcn.1400e4d6c
mov rcx, qword [rsp + 0x40]
cmp word [rcx], r11w
je 0x140050a1f
mov word [rcx], r11w
mov rcx, qword [rsp + 0x40]
mov r15, qword [rsp + 0xc30]
add rcx, 2
mov qword [rsp + 0x98], r15
mov qword [rsp + 0x40], rcx
mov rax, qword [r10 + 0x30]
mov r8, qword [r10 + 0x38]
mov rdx, qword [r10 + 0x48]
mov qword [rsp + 0xe8], rax
mov rax, qword [r10 + 0x40]
movabs r11, 0x7fffffffffffffff
mov qword [rsp + 0x190], rax
mov rax, r8
and rax, r11
mov qword [rsp + 0xc8], rax
mov rax, rdx
and rax, r11
mov qword [rsp + 0xf8], rax
movabs rax, 0x8000000000000000
and r8, rax
and rdx, rax
mov eax, 0x2a
mov qword [rsp + 0x118], r8
mov qword [rsp + 0x158], rdx
cmp ax, word [rcx]
jne 0x140050a9b
or edi, 1
add rcx, 2
mov qword [rsp + 0x40], rcx
mov esi, 1
or edx, 0xffffffff
lea eax, [rsi + 0x7d]
mov r14d, esi
cmp ax, word [r9]
jne 0x140050abe
add r9, 2
mov r14d, edx
mov qword [rsp + 0xc40], r9
cmp ax, word [rcx]
jne 0x140050ace
add rcx, 2
mov esi, edx
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x20]
call fcn.1400621f4
xor r11d, r11d
lea rcx, [rsp + 0x170]
mov qword [rsp + 0xb0], r11
call fcn.1400621f4
xor eax, eax
lea rcx, [rsp + 0x100]
lea edx, [rax + 0x46]
mov qword [rsp + 0x178], rax
mov qword [rsp + 0x180], rax
call fcn.140062268
mov r8d, dword [rsp + 0x88]
mov r11d, 0x46
movzx eax, sil
mov rsi, qword [rsp + 0x20]
xor r10d, r10d
lea r8d, [r8 + r8 + 1]
mov qword [rsp + 0x108], r11
mov ecx, r8d
mov qword [rsp + 0x110], r11
mov qword [rsp + 0x28], rsi
shl ecx, 8
mov edx, r10d
or ecx, eax
lea eax, [r11 + 0x16]
mov dword [rsp + 0xa0], ecx
mov ecx, r10d
cmp ax, word [r15]
jne 0x140050ba3
movzx eax, word [r15 + 2]
lea r9d, [r11 + 0x2f]
or ax, 0x20
cmp r9w, ax
jne 0x140050b85
cmp word [r15 + 4], r10w
jne 0x140050b85
lea ecx, [r11 - 0x45]
jmp 0x140050b9c
mov r9d, 0x6c
cmp r9w, ax
jne 0x140050ba3
cmp word [r15 + 4], r10w
jne 0x140050ba3
lea edx, [r9 - 0x6b]
mov eax, 1
jmp 0x140050ba6
mov eax, r10d
cdqe
movsxd r13, r13d
movsxd r15, r8d
mov qword [rsp + 0xd8], rax
movsxd rax, ecx
mov qword [rsp + 0x148], r13
mov qword [rsp + 0x1a0], rax
movsxd rax, edx
mov qword [rsp + 0xc0], r15
mov qword [rsp + 0x1b8], rax
movsxd rax, r12d
mov qword [rsp + 0x150], rax
movsxd rax, edi
mov rdi, rsi
mov qword [rsp + 0x128], rax
movsxd rax, r14d
mov qword [rsp + 0x120], rax
movsxd rax, ebx
mov qword [rsp + 0x1d0], rax
lea rcx, [rsp + 0x238]
mov ebx, 0xa
call fcn.14004e950
xor r14d, r14d
mov dword [rsp + 0x260], 1
mov dword [rsp + 0x258], r14d
mov dword [rsp + 0x25c], r14d
mov dword [rsp + 0x230], r14d
mov word [rsp + 0x3c], r14w
mov r12, rbp
mov qword [rsp + 0x58], rbp
cmp r13, r14
je 0x140050c98
cmp word [rbp], r14w
je 0x140050c98
lea eax, [rbx + 3]
cmp ax, word [r12]
je 0x140050c80
cmp bx, word [r12]
je 0x140050c80
add r12, 2
mov qword [rsp + 0x58], r12
cmp word [r12], r14w
jne 0x140050c60
jmp 0x140050c98
movzx eax, word [r12]
mov word [r12], r14w
add r12, 2
mov word [rsp + 0x3c], ax
mov qword [rsp + 0x58], r12
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x80]
movsxd rbx, eax
mov rax, rbx
mov qword [rsp + 0xd0], rbx
cqo
idiv r15
lea rdx, [rbx + 0xa]
inc rax
mov qword [rsp + 0x138], rax
call fcn.140062268
mov rcx, qword [rsp + 0x80]
lea r11d, [rbx + 1]
mov rdx, rbp
movsxd r8, r11d
add r8, r8
call fcn.14001d8e0
mov r13, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x98]
mov word [r13 + rbx*2 + 6], r14w
mov word [r13 + rbx*2 + 4], r14w
lea rbx, [r13 + rbx*2]
xor r11d, r11d
mov word [rbx + 2], r14w
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x1a8], r14
mov qword [rsp + 0x1c8], r14
mov qword [rsp + 0x50], r13
mov r14, r13
mov qword [rsp + 0x1c0], rbx
mov qword [rsp + 0x1b0], r13
mov rbp, r13
mov r15, r13
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0xa4], r11d
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor r10d, r10d
cdqe
mov qword [rsp + 0xf0], rax
cmp qword [rsp + 0x130], r10
jne 0x140050d8d
cmp qword [rsp + 0x168], r10
jne 0x140050d8d
cmp qword [rsp + 0xd8], r10
je 0x140051315
mov rax, rdi
sub rax, rsi
sar rax, 1
cmp qword [rsp + 0xd0], rax
jl 0x140050df0
mov rax, rsi
lea rcx, [rsp + 0x20]
sub rax, qword [rsp + 0x20]
sar rax, 1
cdqe
lea rbx, [rax + rax]
mov rdi, rbx
sub rdi, qword [rsp + 0x20]
add rdi, rsi
sar rdi, 1
add edi, 0x400
lea eax, [rdi + 8]
movsxd rdx, eax
call fcn.1400622f4
mov r11, qword [rsp + 0x20]
movsxd rax, edi
lea rax, [r11 + rax*2]
lea rsi, [rbx + r11]
xor r10d, r10d
mov qword [rsp + 0x28], rax
mov rdi, rax
cmp qword [rsp + 0xd8], r10
je 0x140050e80
lea r15, [0x1401175e8]
cmp qword [rsp + 0x1a0], r10
jne 0x140050e77
cmp qword [rsp + 0x1b8], r10
je 0x140050e4d
cmp word [r13], r10w
je 0x140050e4d
mov edi, 0x20
movzx ecx, word [r13]
add r13, 2
lea eax, [rcx - 0x41]
cmp ax, 0x19
ja 0x140050e3a
or cx, di
mov word [rsi], cx
add rsi, 2
cmp word [r13], r10w
jne 0x140050e25
mov rdi, qword [rsp + 0x28]
mov word [rsi], r10w
jmp 0x140051ad5
movzx ecx, word [r13]
add r13, 2
lea eax, [rcx - 0x61]
cmp ax, 0x19
ja 0x140050e70
mov eax, 0xffdf
and cx, ax
mov word [rsi], cx
add rsi, 2
cmp word [r13], r10w
jne 0x140050e56
jmp 0x140050e4d
mov rdx, qword [rsp + 0x168]
cmp rdx, r10
je 0x140051315
mov rax, qword [rsp + 0xc28]
mov ebx, r10d
mov r11, r10
mov rdi, r13
mov qword [rsp + 0x60], r13
mov rcx, rax
mov qword [rsp + 0x48], rax
cmp rdx, 0x31
jne 0x140050ef4
mov qword [rsp + 0x8b0], rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0xc30]
mov qword [rsp + 0x590], rcx
mov dword [rsp + 0x400], eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, 1
xor r10d, r10d
mov dword [rsp + 0x270], eax
jmp 0x140050ff5
cmp word [rax], r10w
je 0x140050f7e
xor ebp, ebp
lea r10, [rsp + 0x8b0]
lea rdi, [0x1401175e8]
mov r9, rbp
cmp r9, 0x190
jge 0x140050f78
mov qword [r10], rcx
lea rcx, [rsp + 0x48]
mov edx, 0xa
mov qword [rsp + 0x590], rdi
mov dword [rsp + r9 + 0x270], ebp
call fcn.1400e4d6c
mov rcx, qword [rsp + 0x48]
mov rax, rcx
sub rax, qword [r10]
sar rax, 1
mov dword [rsp + r9 + 0x400], eax
cmp word [rcx], bp
je 0x140050f69
mov word [rcx], bp
mov rcx, qword [rsp + 0x48]
add rcx, 2
mov qword [rsp + 0x48], rcx
inc ebx
add r10, 8
add r9, 4
cmp word [rcx], bp
jne 0x140050f12
mov rdi, r13
xor r10d, r10d
mov rcx, qword [rsp + 0xc30]
mov qword [rsp + 0x48], rcx
cmp word [rcx], r10w
je 0x140050fec
movsxd r9, ebx
cmp r11, r9
jge 0x140050fec
mov qword [rsp + r11*8 + 0x590], rcx
lea rcx, [rsp + 0x48]
mov edx, 0xa
call fcn.1400e4d6c
mov rcx, qword [rsp + 0x48]
mov rax, rcx
sub rax, qword [rsp + r11*8 + 0x590]
sar rax, 1
mov dword [rsp + r11*4 + 0x270], eax
cmp word [rcx], r10w
je 0x140050fe3
mov word [rcx], r10w
mov rcx, qword [rsp + 0x48]
add rcx, 2
mov qword [rsp + 0x48], rcx
inc r11
cmp word [rcx], r10w
jne 0x140050f94
cmp ebx, r10d
jle 0x140051186
cmp word [r13], r10w
je 0x140051186
movsxd r12, ebx
mov qword [rsp + 0xf0], r12
cmp r12, r10
mov rbp, r10
jle 0x140051102
movsxd rbx, dword [rsp + rbp*4 + 0x400]
cmp ebx, r10d
jle 0x1400510f1
mov rcx, qword [rsp + 0xc8]
mov r15, qword [rsp + 0x50]
mov r13, r10
mov r14, r10
cmp rcx, r10
je 0x14005107a
cmp r15, rdi
je 0x14005107a
mov rax, r15
mov r13, rcx
sub rax, rdi
sar rax, 1
cmp rax, rcx
jl 0x1400510f1
mov r9d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0xe8]
mov r8, rcx
mov rcx, r15
call fcn.14004e904
xor r10d, r10d
cmp rax, r10
jne 0x1400510f1
mov rcx, qword [rsp + rbp*8 + 0x8b0]
lea rdx, [r15 + r13*2]
mov rdi, rbx
lea r15, [rdx + rbx*2]
mov qword [rsp + 0xb8], rbx
mov ebx, dword [rsp + 0x38]
mov r9d, ebx
mov r8, rdi
call fcn.14004e904
xor r10d, r10d
cmp rax, r10
jne 0x1400510ec
mov rax, qword [rsp + 0xf8]
cmp rax, r10
je 0x1400511ec
cmp word [r15], r10w
je 0x1400511ec
mov rdx, qword [rsp + 0x190]
mov r9d, ebx
mov r8, rax
mov rcx, r15
mov r14, rax
call fcn.14004e904
xor r10d, r10d
cmp rax, r10
je 0x1400511ec
mov rdi, qword [rsp + 0x60]
inc rbp
cmp rbp, r12
jl 0x140051017
mov r13, qword [rsp + 0x50]
mov rax, qword [rsp + 0x28]
sub rax, rsi
and rax, 0xfffffffffffffffe
cmp rax, 2
jg 0x140051154
sub rsi, qword [rsp + 0x20]
lea rcx, [rsp + 0x20]
lea rdi, [rsi + 2]
mov rbx, rsi
sar rdi, 1
sar rbx, 1
add edi, 0x400
lea eax, [rdi + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, ebx
movsxd rcx, edi
lea rsi, [rax + r11*2]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x28], rax
movzx eax, word [r13]
add r13, 2
mov word [rsi], ax
add rsi, 2
xor r10d, r10d
mov qword [rsp + 0x50], r13
mov rdi, qword [rsp + 0x60]
cmp word [r13], r10w
jne 0x14005100b
mov r12, qword [rsp + 0x58]
mov r14, qword [rsp + 0x30]
mov rax, qword [rsp + 0x28]
sub rax, rsi
and rax, 0xfffffffffffffffe
cmp rax, 2
jg 0x1400511db
sub rsi, qword [rsp + 0x20]
lea rcx, [rsp + 0x20]
lea rdi, [rsi + 2]
mov rbx, rsi
sar rdi, 1
sar rbx, 1
add edi, 0x400
lea eax, [rdi + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, ebx
movsxd rcx, edi
lea rsi, [rax + r11*2]
xor r10d, r10d
lea rax, [rax + rcx*2]
mov qword [rsp + 0x28], rax
mov rdi, qword [rsp + 0x28]
mov word [rsi], r10w
mov r15, r13
jmp 0x140051ad5
movsxd r12, dword [rsp + rbp*4 + 0x270]
mov rcx, qword [rsp + 0x28]
sub rcx, rsi
lea rbx, [r12 + r14]
add rbx, r13
sar rcx, 1
lea rax, [rbx + 1]
cmp rax, rcx
jl 0x140051263
lea rbx, [rbx + rbx + 2]
mov rdi, rsi
lea rcx, [rsp + 0x20]
sub rbx, qword [rsp + 0x20]
sub rdi, qword [rsp + 0x20]
add rbx, rsi
sar rdi, 1
sar rbx, 1
add ebx, 0x400
lea eax, [rbx + 8]
movsxd rdx, eax
call fcn.1400622f4
mov r11, qword [rsp + 0x20]
movsxd r10, edi
mov rdi, qword [rsp + 0xb8]
movsxd rax, ebx
lea rsi, [r11 + r10*2]
lea rax, [r11 + rax*2]
xor r10d, r10d
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x118], r10
je 0x14005128c
cmp r13, r10
je 0x14005128c
mov rdx, qword [rsp + 0x50]
movsxd r8, r13d
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
lea rsi, [rsi + r13*2]
xor r10d, r10d
cmp r12, r10
jle 0x1400512ae
mov rdx, qword [rsp + rbp*8 + 0x590]
mov r8, r12
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
lea rsi, [rsi + r12*2]
xor r10d, r10d
cmp qword [rsp + 0x158], r10
je 0x1400512d5
cmp r14, r10
je 0x1400512d5
movsxd r8, r14d
mov rdx, r15
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
lea rsi, [rsi + r14*2]
xor r10d, r10d
lea rax, [rdi + r14]
add rax, r13
mov r13, qword [rsp + 0x50]
lea r13, [r13 + rax*2]
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x50], r13
cmp rax, 1
je 0x14005117c
mov r12, qword [rsp + 0xf0]
dec rax
mov qword [rsp + 0xa8], rax
jmp 0x14005116c
mov r8d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0xc28]
lea rcx, [rsp + 0x230]
call fcn.14005047c
xor r10d, r10d
cmp eax, r10d
jne 0x140051cd7
lea rcx, [rsp + 0x208]
mov qword [rsp + 0x1f8], r10
mov qword [rsp + 0x200], r10
call fcn.14004e950
xor eax, eax
lea rcx, [rsp + 0x208]
or r8d, 0xffffffff
mov edx, 0x100
mov dword [rsp + 0x1e0], eax
mov qword [rsp + 0x228], rax
call fcn.14004edb0
xor r10d, r10d
mov qword [rsp + 0x1e8], r10
mov qword [rsp + 0x1f0], r10
cmp word [r13], r10w
je 0x140051a98
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x1e0]
lea rcx, [rsp + 0x230]
mov rdx, rbp
mov rdi, r10
mov r14, r10
call fcn.14004ef54
xor r10d, r10d
mov dword [rsp + 0xa4], eax
cmp eax, r10d
je 0x140051b96
mov rbx, qword [rsp + 0x70]
cmp rbp, rbx
je 0x140051a89
mov rcx, qword [rsp + 0xc8]
mov r12, qword [rsp + 0x1e8]
mov r13, qword [rsp + 0x1f0]
cmp rcx, r10
mov rbp, qword [rsp + 0x50]
mov qword [rsp + 0xb8], r12
jle 0x140051469
cmp r12, rbp
je 0x140051469
mov rax, r12
sub rax, r15
sar rax, 1
cmp rax, rcx
jl 0x14005149c
mov r9d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0xe8]
lea rax, [rcx + rcx]
mov r8, rcx
mov rbx, r12
sub rbx, rax
mov rcx, rbx
call fcn.14004e904
xor r10d, r10d
cmp rax, r10
jne 0x14005149c
cmp qword [rsp + 0x118], r10
mov rdi, qword [rsp + 0xc8]
cmove r12, rbx
mov rbx, qword [rsp + 0x70]
mov qword [rsp + 0xb8], r12
mov rax, qword [rsp + 0xf8]
cmp rax, r10
jle 0x1400514c9
cmp word [rbx], r10w
je 0x1400514c9
mov r9d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0xe8]
mov r8, rax
mov rcx, r13
call fcn.14004e904
xor r10d, r10d
cmp rax, r10
je 0x1400514a6
lea rbp, [r12 + 2]
jmp 0x140051a7e
mov rax, qword [rsp + 0xf8]
mov r14, rax
cmp qword [rsp + 0x158], r10
jne 0x1400514c9
add rax, rax
add r13, rax
add rbx, rax
mov qword [rsp + 0x70], rbx
sub qword [rsp + 0xe0], 1
js 0x1400514dc
mov rbp, rbx
jmp 0x140051a7e
cmp qword [rsp + 0x68], r10
jne 0x1400518fa
mov rdx, qword [rsp + 0x60]
sub r13, r12
mov rbp, r12
sub rbp, r15
mov r15, qword [rsp + 0x98]
sar r13, 1
sar rbp, 1
mov qword [rsp + 0x188], r13
lea rbx, [r14 + rbp]
lea r12, [rbp + rbp]
add rbx, rdi
mov rdi, qword [rsp + 0x28]
lea r13, [rdx + r12]
mov rcx, rdi
lea rax, [rbx + 1]
sub rcx, rsi
sar rcx, 1
cmp rax, rcx
jl 0x140051585
lea rbx, [rbx + rbx + 2]
mov rdi, rsi
lea rcx, [rsp + 0x20]
sub rbx, qword [rsp + 0x20]
sub rdi, qword [rsp + 0x20]
add rbx, rsi
sar rdi, 1
sar rbx, 1
add ebx, 0x400
lea eax, [rbx + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x60]
movsxd r11, edi
movsxd rcx, ebx
xor r10d, r10d
lea rdi, [rax + rcx*2]
lea rsi, [rax + r11*2]
mov qword [rsp + 0x28], rdi
jmp 0x14005158a
mov rax, qword [rsp + 0x20]
cmp rbp, r10
jle 0x1400515a8
movsxd r8, ebp
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
mov rax, qword [rsp + 0x20]
add rsi, r12
xor r10d, r10d
cmp qword [rsp + 0xd8], r10
je 0x140051614
mov rcx, qword [rsp + 0x70]
sub rcx, r13
sar rcx, 1
movsxd rbx, ecx
mov rcx, rdi
sub rcx, rsi
sar rcx, 1
cmp rbx, rcx
jl 0x140051614
add rbx, rbx
mov rdi, rsi
lea rcx, [rsp + 0x20]
sub rbx, rax
sub rdi, rax
add rbx, rsi
sar rdi, 1
sar rbx, 1
add ebx, 0x400
lea eax, [rbx + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, edi
movsxd rcx, ebx
xor r10d, r10d
lea rsi, [rax + r11*2]
lea rdi, [rax + rcx*2]
mov qword [rsp + 0x28], rdi
cmp qword [rsp + 0x130], r10
je 0x140051670
mov r8, qword [rsp + 0x198]
mov rcx, r8
movzx edx, word [r8]
jmp 0x14005163d
cmp dx, word [r13]
je 0x140051645
add rcx, 2
mov dx, word [rcx]
cmp dx, r10w
jne 0x14005162f
jmp 0x140051670
sub rcx, r8
sar rcx, 1
movsxd rdx, ecx
cmp rdx, qword [rsp + 0xf0]
jge 0x140051670
mov rax, qword [rsp + 0xc30]
movzx ecx, word [rax + rdx*2]
mov word [rsi], cx
mov rax, qword [rsp + 0x20]
add rsi, 2
mov rcx, r15
cmp word [rcx], r10w
je 0x1400518e7
mov r13, qword [rsp + 0xb8]
mov r14, qword [rsp + 0x188]
mov ebp, 0x5c
cmp bp, word [r15]
je 0x1400516fd
mov rcx, rdi
sub rcx, rsi
and rcx, 0xfffffffffffffffe
cmp rcx, 4
jg 0x1400516e9
sub rsi, rax
lea rcx, [rsp + 0x20]
lea rdi, [rsi + 4]
mov rbx, rsi
sar rdi, 1
sar rbx, 1
add edi, 0x400
lea eax, [rdi + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd rcx, edi
lea rdi, [rax + rcx*2]
movsxd r11, ebx
xor r10d, r10d
mov qword [rsp + 0x28], rdi
lea rsi, [rax + r11*2]
movzx eax, word [r15]
mov word [rsi], ax
add rsi, 2
add r15, 2
jmp 0x1400518d8
cmp word [r15 + 2], bp
jne 0x140051765
mov rcx, rdi
sub rcx, rsi
and rcx, 0xfffffffffffffffe
cmp rcx, 4
jg 0x140051755
sub rsi, rax
lea rcx, [rsp + 0x20]
lea rdi, [rsi + 4]
mov rbx, rsi
sar rdi, 1
sar rbx, 1
add edi, 0x400
lea eax, [rdi + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd rcx, edi
lea rdi, [rax + rcx*2]
movsxd r11, ebx
xor r10d, r10d
mov qword [rsp + 0x28], rdi
lea rsi, [rax + r11*2]
mov word [rsi], bp
add rsi, 2
add r15, 4
jmp 0x1400518d8
movzx ecx, word [r15 + 2]
mov r9d, 0x30
sub cx, r9w
cmp cx, 9
ja 0x1400518dd
movzx edx, word [r15 + 2]
lea r8d, [r9 - 0x2f]
sub edx, r9d
add r15, 4
movzx ecx, word [r15]
sub cx, r9w
cmp cx, 9
ja 0x1400517b1
movzx ecx, word [r15]
lea edx, [rdx + rdx*4]
add r15, 2
sub r8d, 1
lea edx, [rcx + rdx*2 - 0x30]
jns 0x14005178e
cmp edx, r10d
jne 0x140051822
mov rcx, rdi
sub rcx, rsi
sar rcx, 1
cmp r14, rcx
jl 0x140051808
lea rbx, [r14 + r14]
mov rdi, rsi
lea rcx, [rsp + 0x20]
sub rbx, rax
sub rdi, rax
add rbx, rsi
sar rdi, 1
sar rbx, 1
add ebx, 0x400
lea eax, [rbx + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, edi
movsxd rcx, ebx
lea rsi, [rax + r11*2]
lea rdi, [rax + rcx*2]
mov qword [rsp + 0x28], rdi
movsxd r8, r14d
mov rdx, r13
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
lea rsi, [rsi + r14*2]
jmp 0x1400518d5
cmp edx, dword [rsp + 0x1e0]
ja 0x1400518dd
dec edx
cmp edx, dword [rsp + 0x1e0]
jae 0x140051de6
mov rcx, qword [rsp + 0x200]
add rdx, rdx
mov rbp, qword [rcx + rdx*8 + 8]
mov r12, qword [rcx + rdx*8]
mov rcx, rdi
mov qword [rsp + 0x1c8], rbp
sub rbp, r12
sub rcx, rsi
sar rbp, 1
sar rcx, 1
mov qword [rsp + 0x1a8], r12
cmp rbp, rcx
jl 0x1400518bb
lea rbx, [rbp + rbp]
mov rdi, rsi
lea rcx, [rsp + 0x20]
sub rbx, rax
sub rdi, rax
add rbx, rsi
sar rdi, 1
sar rbx, 1
add ebx, 0x400
lea eax, [rbx + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, edi
movsxd rcx, ebx
lea rsi, [rax + r11*2]
lea rdi, [rax + rcx*2]
mov qword [rsp + 0x28], rdi
movsxd r8, ebp
mov rdx, r12
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
lea rsi, [rsi + rbp*2]
mov ebp, 0x5c
xor r10d, r10d
mov rax, qword [rsp + 0x20]
cmp word [r15], r10w
jne 0x140051692
inc qword [rsp + 0x78]
mov r14, qword [rsp + 0x30]
mov word [rsi], r10w
jmp 0x140051a55
mov rdi, qword [rsp + 0x150]
mov qword [rsp + 0x160], r12
mov qword [rsp + 0x140], r13
cmp rdi, r10
je 0x14005197d
mov r9, qword [rsp + 0xc30]
lea rcx, [rsp + 0xc30]
mov edx, 0x3b
call fcn.1400e4d6c
mov rcx, qword [rsp + 0xc30]
cmp word [rcx], r10w
je 0x14005194c
mov word [rcx], r10w
add qword [rsp + 0xc30], 2
movzx ebx, word [r13]
cmp bx, r10w
je 0x14005195c
mov word [r13], r10w
mov rcx, qword [rsp + 0xc48]
mov r8, r12
mov rdx, r9
call fcn.14006150c
xor r11d, r11d
cmp bx, r11w
je 0x14005197d
mov word [r13], bx
mov rcx, qword [rsp + 0x40]
inc qword [rsp + 0x78]
lea r14, [r12 + 2]
sub r12, rbp
mov qword [rsp + 0x30], r14
sar r12, 1
mov rax, r12
cqo
lea r10, [r12 + 1]
xor r12d, r12d
idiv qword [rsp + 0xc0]
lea rbx, [rax + 1]
cmp word [rcx], r12w
je 0x1400519fa
mov r9d, dword [rsp + 0xd0]
mov r8d, dword [rsp + 0xa0]
mov edx, r10d
mov rcx, rbp
call fcn.14005f164
movsxd rdx, eax
cmp qword [rsp + 0x128], r12
je 0x1400519ed
lea rcx, [rsp + 0x100]
call fcn.14006ba48
jmp 0x1400519fa
mov rcx, qword [rsp + 0x100]
call fcn.1400e23dc
xor r10d, r10d
cmp qword [rsp + 0x128], r10
je 0x140051a38
cmp qword [rsp + 0x120], r10
jg 0x140051a23
cmp rbx, r10
jle 0x140051a23
mov rdx, qword [rsp + 0x138]
sub rdx, rbx
jmp 0x140051a26
mov rdx, rbx
lea rcx, [rsp + 0x170]
call fcn.14006ba48
xor r10d, r10d
jmp 0x140051a55
mov rax, qword [rsp + 0xc30]
cmp word [rax], r10w
je 0x140051a4b
cmp rdi, r10
jne 0x140051a55
cmp byte [rsp + 0xc38], r10b
jne 0x140051a8e
mov rax, qword [rsp + 0x70]
mov rbp, rax
mov r15, rax
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0xa8]
cmp rax, 1
je 0x140051a8e
dec rax
mov qword [rsp + 0xa8], rax
cmp word [rbp], r10w
jne 0x14005139d
mov r14, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x28]
mov r12, qword [rsp + 0x58]
lea rcx, [rsp + 0x208]
call fcn.14004eb70
mov rcx, qword [rsp + 0x200]
call fcn.1400ffb28
mov rcx, qword [rsp + 0x1f8]
xor r11d, r11d
mov qword [rsp + 0x200], r11
call fcn.1400ffb28
xor r10d, r10d
mov qword [rsp + 0x1f8], r10
mov r13, qword [rsp + 0x68]
cmp r13, r10
je 0x140051c37
cmp qword [rsp + 0x150], r10
jne 0x140051b27
mov rax, qword [rsp + 0xc30]
cmp word [rax], r10w
je 0x140051b27
mov rax, qword [rsp + 0x140]
mov r8, qword [rsp + 0x160]
mov rcx, qword [rsp + 0xc48]
mov word [rax], r10w
mov rdx, qword [rsp + 0xc30]
call fcn.14006150c
xor r10d, r10d
mov r15, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x1b0]
mov r8, qword [rsp + 0x170]
sub r14, rcx
sar r14, 1
lea rax, [r15 + r14 - 1]
cqo
idiv r15
mov rbx, rax
mov eax, r10d
cmp word [r8], r10w
jne 0x140051ce4
mov r8, qword [rsp + 0x40]
cmp word [r8], r10w
je 0x140051be5
cmp dword [rsp + 0xa4], r10d
jle 0x140051bcc
mov r9d, dword [rsp + 0xd0]
mov r8d, dword [rsp + 0xa0]
mov edx, r14d
call fcn.14005f164
mov rcx, qword [rsp + 0x100]
jmp 0x140051bda
mov r12, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x28]
mov r14, qword [rsp + 0x30]
cmp qword [rsp + 0x1d0], r10
je 0x140051a98
mov rcx, qword [rsp + 0xe0]
cmp rcx, r10
cmovle r15, qword [rsp + 0x1c0]
jmp 0x140051a98
mov rcx, qword [rsp + 0x100]
cmp word [rcx], r10w
jne 0x140051be5
movsxd rdx, eax
call fcn.1400e23dc
xor r10d, r10d
cmp qword [rsp + 0x120], r10
jg 0x140051c02
cmp rbx, r10
jle 0x140051c02
mov rax, qword [rsp + 0x138]
sub rax, rbx
mov rbx, rax
lea rcx, [rsp + 0x20]
mov edx, 0x3c
call fcn.1400622f4
lea rdx, [0x140118018]
mov r8, rbx
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfW]
mov rbp, rbx
mov qword [rsp + 0xb0], rbx
xor r10d, r10d
jmp 0x140051cec
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rbp, eax
mov rax, qword [rsp + 0x28]
sub rax, rsi
sar rax, 1
cmp rbp, rax
jl 0x140051c9c
lea rbx, [rbp + rbp]
mov rdi, rsi
lea rcx, [rsp + 0x20]
sub rbx, qword [rsp + 0x20]
sub rdi, qword [rsp + 0x20]
add rbx, rsi
sar rdi, 1
sar rbx, 1
add ebx, 0x400
lea eax, [rbx + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, edi
movsxd rcx, ebx
lea rsi, [rax + r11*2]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x28], rax
mov r8, rbp
mov rdx, r15
mov rcx, rsi
add r8, r8
call fcn.14001d8e0
mov rdi, qword [rsp + 0x28]
mov r15, qword [rsp + 0xc0]
lea rsi, [rsi + rbp*2]
xor r10d, r10d
mov word [rsi], r10w
mov rbx, qword [rsp + 0x20]
mov rbp, rbx
mov qword [rsp + 0xb0], rbx
jmp 0x140051cf1
mov r13, qword [rsp + 0x68]
mov r15, qword [rsp + 0xc0]
mov rbp, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x30], rbx
cmp byte [rsp + 0xc20], r10b
jne 0x140051f94
cmp qword [rsp + 0x148], r10
je 0x140051df1
mov bp, word [rsp + 0x3c]
cmp bp, r10w
je 0x140051db5
mov rax, qword [rsp + 0x28]
mov word [r12 - 2], bp
sub rax, rsi
and rax, 0xfffffffffffffffe
cmp rax, 6
jg 0x140051d7a
sub rsi, rbx
lea rcx, [rsp + 0x20]
lea rdi, [rsi + 6]
mov rbx, rsi
sar rdi, 1
sar rbx, 1
add edi, 0x400
lea eax, [rdi + 8]
movsxd rdx, eax
call fcn.1400622f4
mov rax, qword [rsp + 0x20]
movsxd r11, ebx
movsxd rcx, edi
lea rsi, [rax + r11*2]
xor r10d, r10d
lea rax, [rax + rcx*2]
mov qword [rsp + 0x28], rax
mov eax, 0xd
mov word [rsi], bp
add rsi, 2
cmp ax, bp
jne 0x140051da2
mov eax, 0xa
cmp ax, word [r12]
jne 0x140051da2
mov word [rsi], ax
add rsi, 2
add r12, 2
mov rdi, qword [rsp + 0x28]
mov word [rsi], r10w
mov rbx, qword [rsp + 0x20]
mov qword [rsp + 0x30], rbx
mov rbp, r12
cmp word [r12], r10w
je 0x140051df1
lea rcx, [rsp + 0x80]
call fcn.140059920
lea rcx, [rsp + 0x238]
call fcn.14004eb70
mov r13, qword [rsp + 0x148]
jmp 0x140050c0b
mov ecx, 0x80004005
call fcn.14004e924
int3
mov r8, qword [rsp + 0x170]
cmp word [r8], r10w
jne 0x140051ef5
cmp dword [rsp + 0x88], r10d
jle 0x140051ef2
cmp r13, r10
jne 0x140051ef2
mov rcx, rbx
mov qword [rsp + 0xc38], rbx
mov qword [rsp + 0x68], r10
mov rdi, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor esi, esi
mov dword [rsp + 0xc28], eax
mov eax, dword [rsp + 0xc28]
mov rax, qword [rsp + 0xc38]
movzx ecx, word [rax]
cmp cx, si
je 0x140051eb3
lea ebx, [rsi + 0x20]
cmp bx, cx
jne 0x140051e67
add rax, 2
mov qword [rsp + 0xc38], rax
lea r8, [rsp + 0xc20]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0xc38]
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0xc20], 2
call fcn.1400636dc
cmp eax, esi
jle 0x140051eae
mov al, byte [rsp + 0x68]
mov byte [rdi], al
mov rax, qword [rsp + 0xc38]
inc rdi
mov cx, word [rax]
cmp cx, si
jne 0x140051e56
mov rbx, qword [rsp + 0x30]
lea rcx, [0x140138118]
mov dword [rdi], esi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r8, qword [rsp + 0x20]
mov rdx, qword [rsp + 0xc40]
mov rcx, qword [rsp + 0xc48]
sub rbx, rdi
lea r9, [rbx - 0x10]
call fcn.14001e830
lea rcx, [0x140138118]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140051f0c
mov r8, rbx
mov rdx, qword [rsp + 0xc40]
mov rcx, qword [rsp + 0xc48]
call fcn.14006150c
xor esi, esi
mov r8, qword [rsp + 0x90]
cmp word [r8], si
je 0x140051f2c
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0xc48]
call fcn.140065590
mov r8, qword [rsp + 0x100]
cmp word [r8], si
je 0x140051f4c
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xc48]
call fcn.14006150c
mov rbx, qword [rsp + 0x20]
lea rcx, [rsp + 0x80]
call fcn.140059920
lea rcx, [rsp + 0x238]
call fcn.14004eb70
lea rcx, [rsp + 0x100]
call fcn.140059920
lea rcx, [rsp + 0x170]
call fcn.140059920
lea rcx, [rsp + 0x20]
call fcn.140059920
mov rax, rbx
jmp 0x140051fd5
lea rcx, [rsp + 0x80]
call fcn.140059920
lea rcx, [rsp + 0x238]
call fcn.14004eb70
lea rcx, [rsp + 0x100]
call fcn.140059920
lea rcx, [rsp + 0x170]
call fcn.140059920
lea rcx, [rsp + 0x20]
call fcn.140059920
mov rax, rbp
add rsp, 0xbd8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret