Function at 0x140011450
Capabilities:
Validate payment card number using luhn algorithm
Write file on windows

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov qword [rax - 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov rax, qword [0x14003c008]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0x70], rdx
xor ebx, ebx
mov word [0x140042d3c], bx
mov word [0x140042d50], bx
mov word [0x140042de4], bx
mov word [0x140042d48], bx
mov dword [0x140042d44], ebx
mov word [rsp + 0x48], bx
mov word [0x140042de0], bx
mov word [0x140042d54], bx
mov word [0x140042d38], bx
mov word [0x140042d34], bx
mov word [0x140042aa8], bx
mov word [0x140042df0], bx
mov ebp, 1
mov word [rsp + 0x40], bp
mov ecx, ebx
lea rsi, [0x140000000]
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx + rsi + 0x30948]
mov byte [rsp + rcx + 0x80], al
lea rcx, [rcx + 1]
test al, al
jne 0x140011500
mov ecx, 0x10
call qword [sym.imp.mfc140u.dll_CMFCRibbonInfo::XElementButtonLinkCtrl::XElementButtonLinkCtrl]
mov rdi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14001156a
mov word [rax], bx
mov qword [rax + 8], rbx
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x14001156d
inc eax
movsxd rcx, eax
call qword [sym.imp.mfc140u.dll_operator_1]
mov qword [rdi + 8], rax
lea rdx, [rsp + 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x14001156d
mov rdi, rbx
mov edx, ebp
mov rcx, rdi
call fcn.14002a380
mov r12, rax
test rax, rax
jne 0x140011587
or eax, 0xffffffff
jmp 0x14001202c
test rdi, rdi
je 0x1400115a8
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14001159b
call qword [sym.imp.mfc140u.dll_operator]
mov edx, 0x10
mov rcx, rdi
call fcn.14002c9cc
mov rdx, rbx
nop dword [rax + rax]
movzx eax, byte [rdx + rsi + 0x302e8]
mov byte [rsp + rdx + 0x80], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400115b0
mov ecx, 0x10
call qword [sym.imp.mfc140u.dll_CMFCRibbonInfo::XElementButtonLinkCtrl::XElementButtonLinkCtrl]
mov rdi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14001161a
mov word [rax], bx
mov qword [rax + 8], rbx
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x14001161d
inc eax
movsxd rcx, eax
call qword [sym.imp.mfc140u.dll_operator_1]
mov qword [rdi + 8], rax
lea rdx, [rsp + 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x14001161d
mov rdi, rbx
mov edx, 0xa
mov rcx, rdi
call fcn.14002a380
mov rsi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140011fe3
mov rcx, rdi
call fcn.14002a780
mov edi, 0x2710
mov qword [rsp + 0x68], rdi
mov r15d, 0x4b0
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [0x14003e178], rax
test rax, rax
jne 0x140011671
mov eax, 0xfffffffd
jmp 0x14001202c
mov r13d, 0x960
mov ecx, r13d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [0x14003e180], rax
test rax, rax
je 0x140011667
mov ecx, 4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
test rax, rax
je 0x140011667
mov word [0x14003e188], bx
mov rcx, rbx
mov rdx, r15
nop dword [rax]
mov rax, qword [0x14003e180]
mov word [rcx + rax], bx
lea rcx, [rcx + 2]
sub rdx, 1
jne 0x1400116b0
mov rax, qword [0x14003e178]
mov byte [rax], dl
mov rcx, rbp
mov edx, 0x270f
nop word [rax + rax]
mov rax, qword [0x14003e178]
mov byte [rcx + rax], 0
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x1400116e0
mov word [rsp + 0x42], di
mov edx, 0x800
mov r8, r12
lea rcx, [0x140043d70]
call fcn.140029e70
movzx ebp, word [rsp + 0x44]
xor edi, edi
test ax, ax
jle 0x140012009
mov ebx, operator
mov rcx, r12
call fcn.14001af60
test ax, ax
je 0x140011782
movzx r8d, word [0x14003e1bc]
mov word [0x14003e1b0], r8w
movzx ecx, word [0x14003e170]
imul ecx, r8d
mov eax, 0x51eb851f
imul ecx
mov ecx, edx
sar ecx, 5
mov eax, ecx
shr eax, 0x1f
add ecx, eax
add cx, word [0x14003e16c]
mov word [0x14003e174], cx
lea rdx, [0x14003e1d0]
call qword [0x140041ab0]
test ax, ax
jne 0x140011d7a
inc word [0x140042de4]
lea r9, [0x140043d70]
mov rax, r9
mov ecx, edi
cmp byte [rax], 0
jne 0x1400117a0
cmp byte [rax + 1], 0
je 0x1400117a8
add rax, 2
inc ecx
jmp 0x140011795
add cx, cx
mov word [0x14003e1c4], cx
mov dword [r14], 0x20
mov rax, r9
mov rdx, r14
movzx ecx, byte [0x140043d70]
or cl, byte [0x140043d71]
je 0x140011667
movzx r8d, word [r14]
cmp word [rax], r8w
jne 0x1400117fb
mov rdi, rax
nop
lea rdx, [rdx + 2]
movzx ecx, word [rdx]
test cx, cx
je 0x14001180d
add rax, 2
cmp word [rax], cx
je 0x1400117e0
mov rax, rdi
mov rdx, r14
add rax, 2
movzx ecx, byte [rax + 1]
or cl, byte [rax]
je 0x140011667
jmp 0x1400117d6
test rdi, rdi
je 0x140011667
mov rax, r9
xor ecx, ecx
nop dword [rax + rax]
cmp byte [rax], 0
jne 0x14001182b
cmp byte [rax + 1], 0
je 0x140011833
add rax, 2
inc ecx
jmp 0x140011820
add cx, cx
add word [0x140042d50], cx
mov word [rdi], 0
add rdi, 2
lea rdx, [rsp + 0x4c]
mov rcx, rdi
call fcn.140029d80
test ax, ax
je 0x140011fea
movzx eax, ax
add rdi, rax
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.140029d80
test ax, ax
je 0x140011667
movzx eax, ax
add rdi, rax
lea rdx, [rsp + 0x54]
mov rcx, rdi
call fcn.140029d80
test ax, ax
je 0x140011667
movzx ecx, ax
add rcx, rdi
lea rdx, [rsp + 0x44]
call fcn.140029d80
test ax, ax
je 0x140011667
xor eax, eax
movzx edx, ax
movzx r9d, word [rsp + 0x4c]
movzx edi, word [rsp + 0x50]
movzx r8d, word [rsp + 0x54]
movzx r10d, word [rsp + 0x44]
movzx ecx, word [0x14003ee64]
cmp ax, cx
jge 0x140011906
mov rax, qword [rsp + 0x70]
add rax, 4
nop
cmp word [rax - 4], di
jne 0x1400118fa
cmp word [rax - 2], r9w
jne 0x1400118fa
cmp word [rax], r8w
jne 0x1400118fa
cmp word [rax + 2], r10w
je 0x140011906
add rax, 0xa
inc dx
cmp dx, cx
jl 0x1400118e0
mov word [rsp + 0x30], r8w
mov word [rsp + 0x28], di
mov word [rsp + 0x20], r10w
call fcn.140012110
test ax, ax
jne 0x140011667
movsx r8d, word [0x140042d40]
mov ecx, 0x1fe
sub ecx, r8d
movsxd r9, dword [0x140042d44]
cmp r9d, ecx
jge 0x140011960
inc r8w
lea rcx, [0x140042e70]
add rcx, r9
call fcn.140012730
mov esi, 1
xor edi, edi
jmp 0x140011d0e
movzx ecx, word [0x140042d48]
cmp cx, word [0x140042de4]
cmovl cx, word [0x140042de4]
mov word [0x140042d48], cx
xor ebp, ebp
mov word [0x140042de4], bp
movzx ecx, word [0x140042d3c]
cmp cx, word [0x140042d50]
cmovl cx, word [0x140042d50]
mov word [0x140042d3c], cx
mov word [0x140042d50], bp
movzx ecx, word [0x140042aa8]
lea r10, [0x140042e70]
movzx edx, word [0x140042d34]
cmp word [0x140042d4c], bp
je 0x1400119ed
or byte [r9 + r10], 0xf
inc r9d
mov dword [0x140042d44], r9d
test cx, cx
je 0x1400119e6
inc dx
mov word [0x140042d34], dx
mov word [0x140042d4c], bp
test cx, cx
je 0x140011a34
cmp word [0x140042de0], bp
je 0x140011a1e
movsx eax, word [0x140042d38]
mov ecx, 1
sub ecx, eax
movsx eax, dx
sub ecx, eax
add r9d, ecx
movsxd rax, r9d
or byte [rax + r10], 0xf
inc r9d
jmp 0x140011a2d
movsx ecx, word [0x140042d38]
movsx eax, dx
add ecx, eax
sub r9d, ecx
mov dword [0x140042d44], r9d
cmp r9d, 0x200
jge 0x140011a5e
movsxd rdi, r9d
add rdi, r10
mov edx, 0x200
sub edx, r9d
mov eax, 0xff
mov ecx, edx
rep stosb byte [rdi], al
add r9d, edx
mov dword [0x140042d44], r9d
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x58]
mov r8d, 0x200
mov rdx, r10
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140011aaa
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x140011a9b
mov eax, eax
lea rcx, [0x140000000]
mov ecx, dword [rcx + rax*4 + 0x30680]
jmp 0x140011a9d
mov ecx, ebx
mov dword [0x140042de8], ecx
mov byte [0x1400433b0], bpl
cmp dword [rsp + 0x58], 0x200
jne 0x140011fe3
mov esi, ebp
movzx edi, word [0x14003e188]
inc di
mov word [0x14003e188], di
cmp di, r15w
jb 0x140011b45
movzx ecx, r13w
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add dx, r13w
mov eax, 0x7d00
cmp dx, ax
ja 0x140011d84
movzx edx, dx
mov rcx, qword [0x14003e180]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r8, rax
mov qword [0x14003e180], rax
test rax, rax
je 0x140011667
movzx ecx, r15w
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add r15w, dx
movzx eax, r15w
lea r13d, [rax + rax]
movzx edi, word [0x14003e188]
jmp 0x140011b4c
mov r8, qword [0x14003e180]
movzx edx, bp
movzx eax, byte [0x140043d70]
cmp byte [0x140042df0], al
jne 0x140011b9c
mov rcx, rbp
lea r9, [0x140043d70]
lea r10, [0x140042df0]
nop
movzx eax, byte [rcx + r9 + 1]
cmp byte [rcx + r10 + 1], al
jne 0x140011b9c
cmp byte [rcx + r10], sil
jne 0x140011b89
cmp byte [rcx + r9], sil
je 0x140011b9c
add rcx, 2
add dx, 2
movzx eax, byte [rcx + r9]
cmp byte [rcx + r10], al
je 0x140011b70
movsx eax, dx
cdq
sub eax, edx
sar eax, 1
mov ebx, eax
inc bx
movzx ecx, di
movzx eax, word [r8 + rcx*2 - 2]
add ax, word [rsp + 0x40]
mov word [r8 + rcx*2], ax
movzx ecx, word [0x14003e188]
mov rdx, qword [0x14003e180]
movzx ebp, word [rdx + rcx*2]
add bp, bx
cmp bp, word [rsp + 0x68]
jbe 0x140011c5f
movzx edi, word [rsp + 0x42]
mov eax, 0x66666667
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add dx, di
mov eax, 0x7d00
cmp dx, ax
ja 0x140011d84
movzx edx, dx
mov rcx, qword [0x14003e178]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdi, rax
mov qword [0x14003e178], rax
test rax, rax
je 0x140011667
mov r8, qword [rsp + 0x68]
movzx ecx, r8w
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add r8w, dx
mov qword [rsp + 0x68], r8
mov word [rsp + 0x42], r8w
movzx ecx, word [0x14003e188]
mov rdx, qword [0x14003e180]
jmp 0x140011c66
mov rdi, qword [0x14003e178]
movzx eax, cx
movsx rcx, word [rdx + rax*2]
add rcx, rdi
movzx r8d, bx
call fcn.140012910
test ax, ax
je 0x140011667
movzx ecx, word [0x14003e188]
mov rax, qword [0x14003e180]
movzx edx, word [rax + rcx*2]
sub dx, word [rax + rcx*2 - 2]
movzx eax, word [rsp + 0x48]
cmp ax, dx
cmovb ax, dx
mov word [rsp + 0x48], ax
mov word [rsp + 0x40], bx
xor edi, edi
mov dword [0x140042d44], edi
lea r8d, [rdi + 1]
mov rcx, r12
cmp word [0x140042aa8], si
movsx edx, word [0x140042d54]
jne 0x140011cd6
movsx edx, word [0x14003e1c4]
neg edx
call fcn.14002a520
cmp eax, 0xffffffff
je 0x14001157f
mov word [0x140042d54], di
mov word [0x140042aa8], di
mov word [0x140042de0], di
mov word [0x140042d34], di
mov word [0x140043d70], si
mov ebx, operator
lea r9, [0x140043d70]
mov rcx, r9
lea rax, [0x140042df0]
mov rdx, rax
movzx eax, byte [rcx]
test al, al
jne 0x140011d2e
cmp byte [rcx + 1], al
je 0x140011d41
mov byte [rdx], al
movzx eax, byte [rcx + 1]
mov byte [rdx + 1], al
add rdx, 2
add rcx, 2
jmp 0x140011d22
movzx eax, byte [rcx]
mov byte [rdx], al
movzx eax, byte [rcx + 1]
mov byte [rdx + 1], al
mov word [0x140042d40], di
mov word [0x140042d30], di
mov edx, 0x800
mov r8, r12
mov rcx, r9
call fcn.140029e70
test ax, ax
jle 0x140011d8e
mov rsi, qword [rsp + 0x60]
jmp 0x140011723
mov eax, 0xfffffffc
jmp 0x14001202c
mov eax, 0xfffffffb
jmp 0x14001202c
test si, si
je 0x140012004
movzx r9d, word [0x14003e188]
inc r9w
mov word [0x14003e188], r9w
cmp r9w, r15w
mov r15d, 0x7d00
jb 0x140011e03
movzx ecx, r13w
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add dx, r13w
cmp dx, r15w
ja 0x140011d84
movzx edx, dx
mov rcx, qword [0x14003e180]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r10, rax
mov qword [0x14003e180], rax
test rax, rax
je 0x140011667
movzx r9d, word [0x14003e188]
jmp 0x140011e0a
mov r10, qword [0x14003e180]
lea rsi, [0x140042e70]
cmp word [0x140042d4c], 0
je 0x140011e4b
movsxd r8, dword [0x140042d44]
or byte [r8 + rsi], 0xf
inc r8d
mov dword [0x140042d44], r8d
cmp word [0x140042aa8], 0
je 0x140011e42
inc word [0x140042d34]
mov word [0x140042d4c], di
jmp 0x140011e52
mov r8d, dword [0x140042d44]
cmp r8d, 0x200
jge 0x140011e7e
movsxd rdi, r8d
add rdi, rsi
mov edx, 0x200
sub edx, r8d
mov eax, 0xff
mov ecx, edx
rep stosb byte [rdi], al
add r8d, edx
mov dword [0x140042d44], r8d
xor edi, edi
movzx edx, di
movzx eax, byte [0x140043d70]
cmp byte [0x140042df0], al
jne 0x140011ecc
mov rcx, rdi
lea rdi, [0x140043d70]
lea r8, [0x140042df0]
movzx eax, byte [rcx + rdi + 1]
cmp byte [rcx + r8 + 1], al
jne 0x140011ecc
cmp byte [rcx + r8], 0
jne 0x140011eba
cmp byte [rcx + rdi], 0
je 0x140011ecc
add rcx, 2
add dx, 2
movzx eax, byte [rcx + rdi]
cmp byte [rcx + r8], al
je 0x140011ea1
movsx eax, dx
cdq
sub eax, edx
sar eax, 1
mov ebx, eax
inc bx
movzx ecx, r9w
movzx eax, word [r10 + rcx*2 - 2]
add ax, word [rsp + 0x40]
mov word [r10 + rcx*2], ax
movzx ecx, word [0x14003e188]
mov rdi, qword [0x14003e180]
movzx ebp, word [rdi + rcx*2]
add bp, bx
cmp bp, word [rsp + 0x68]
jbe 0x140011f5f
movzx edi, word [rsp + 0x42]
mov eax, 0x66666667
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add dx, di
cmp dx, r15w
ja 0x140011d84
movzx edx, dx
mov rcx, qword [0x14003e178]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdx, rax
mov qword [0x14003e178], rax
test rax, rax
je 0x140011667
movzx ecx, word [0x14003e188]
mov rdi, qword [0x14003e180]
jmp 0x140011f66
mov rdx, qword [0x14003e178]
movzx eax, cx
movsx rcx, word [rdi + rax*2]
add rcx, rdx
movzx r8d, bx
call fcn.140012910
test ax, ax
je 0x140011667
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x58]
mov r8d, 0x200
mov rdx, rsi
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140011fd9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x140011fc7
mov eax, eax
lea rcx, [0x140000000]
mov ecx, dword [rcx + rax*4 + 0x30680]
jmp 0x140011fcc
mov ecx, operator
mov dword [0x140042de8], ecx
mov byte [0x1400433b0], dil
cmp dword [rsp + 0x58], 0x200
je 0x140012009
mov eax, 0xfffffffe
jmp 0x14001202c
movzx eax, byte [rdi]
sub al, 0x30
cmp al, 9
ja 0x140011ffd
cmp byte [rdi + 1], 0
je 0x140011667
mov eax, 0xfffffff9
jmp 0x14001202c
mov rsi, qword [rsp + 0x60]
mov word [0x14003e18a], bp
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r12
call fcn.14002a1e0
mov rcx, rsi
call fcn.14002a1e0
movzx eax, di
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14002c160
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret