Function at 0x1400121f0
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 [section..data]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0x70], rdx
xor ebp, ebp
mov word [0x140042d6c], bp
mov word [0x140042d64], bp
mov word [0x140042d68], bp
mov word [0x140042d74], bp
mov dword [0x140042d58], ebp
mov word [rsp + 0x48], bp
mov word [0x140043080], bp
mov word [0x140042d70], bp
mov word [0x140042d5c], bp
mov word [0x140042d50], bp
mov word [0x140042d60], bp
mov word [0x140043000], bp
mov ebx, 1
mov word [rsp + 0x44], bx
mov ecx, ebp
lea rsi, [0x140000000]
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx + rsi + 0x313c8]
mov byte [rsp + rcx + 0x80], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400122a0
mov ecx, 0x10
call qword [sym.imp.mfc120u.dll_Ordinal_1484]
mov rdi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14001230a
mov word [rax], bp
mov qword [rax + 8], rbp
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x14001230d
inc eax
movsxd rcx, eax
call qword [sym.imp.mfc120u.dll_Ordinal_1484]
mov qword [rdi + 8], rax
lea rdx, [rsp + 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x14001230d
mov rdi, rbp
mov edx, ebx
mov rcx, rdi
call fcn.14002ab70
mov r12, rax
test rax, rax
jne 0x140012327
or eax, 0xffffffff
jmp 0x140012de6
test rdi, rdi
je 0x140012344
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14001233b
call qword [sym.imp.mfc120u.dll_Ordinal_1486]
mov rcx, rdi
call qword [sym.imp.mfc120u.dll_Ordinal_1486]
mov rdx, rbp
nop word [rax + rax]
movzx eax, byte [rdx + rsi + 0x31380]
mov byte [rsp + rdx + 0x80], al
lea rdx, [rdx + 1]
test al, al
jne 0x140012350
mov ecx, 0x10
call qword [sym.imp.mfc120u.dll_Ordinal_1484]
mov rdi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x1400123ba
mov word [rax], bp
mov qword [rax + 8], rbp
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x1400123bd
inc eax
movsxd rcx, eax
call qword [sym.imp.mfc120u.dll_Ordinal_1484]
mov qword [rdi + 8], rax
lea rdx, [rsp + 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x1400123bd
mov rdi, rbp
mov edx, 0xa
mov rcx, rdi
call fcn.14002ab70
mov rsi, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140012d9d
mov rcx, rdi
call fcn.14002af10
mov ebx, 0x2710
mov qword [rsp + 0x68], rbx
mov r15d, 0x4b0
mov ecx, ebx
call qword [sym.imp.MSVCR120.dll_malloc]
mov qword [0x14003e0e8], rax
test rax, rax
jne 0x140012411
mov eax, 0xfffffffd
jmp 0x140012de6
mov r13d, 0x960
mov ecx, r13d
call qword [sym.imp.MSVCR120.dll_malloc]
mov rdi, rax
mov qword [0x14003e0f0], rax
test rax, rax
je 0x140012407
mov ecx, 4
call qword [sym.imp.MSVCR120.dll_malloc]
mov r14, rax
test rax, rax
je 0x140012407
mov word [0x14003e0f8], bp
mov rax, rbp
mov rcx, r15
nop
mov word [rax + rdi], bp
lea rax, [rax + 2]
dec rcx
je 0x140012466
mov rdi, qword [0x14003e0f0]
jmp 0x140012450
mov rax, qword [0x14003e0e8]
mov byte [rax], 0
mov ecx, 1
mov edx, 0x270f
nop word [rax + rax]
mov rax, qword [0x14003e0e8]
mov byte [rcx + rax], 0
lea rcx, [rcx + 1]
dec rdx
jne 0x140012480
mov word [rsp + 0x46], bx
mov edx, 0x800
mov r8, r12
lea rcx, [0x140043d30]
call fcn.14002a640
movzx ebp, word [rsp + 0x40]
xor edi, edi
test ax, ax
jle 0x140012dc3
mov ebx, 0x106
mov rcx, r12
call fcn.14001bd30
test ax, ax
je 0x140012521
movzx r8d, word [0x14003ee5c]
mov word [0x14003e1a4], r8w
movzx ecx, word [0x14003ee60]
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 [0x14003ee48]
mov word [0x14003ee50], cx
lea rdx, [0x14003e1b0]
call qword [0x140041aa8]
test ax, ax
jne 0x140012b2a
inc word [0x140042d68]
lea r9, [0x140043d30]
mov rax, r9
mov ecx, edi
cmp byte [rax], 0
jne 0x14001253f
cmp byte [rax + 1], 0
je 0x140012547
add rax, 2
inc ecx
jmp 0x140012534
add cx, cx
mov word [0x14003ee54], cx
mov dword [r14], 0x20
mov rax, r9
mov rdx, r14
movzx ecx, byte [0x140043d30]
or cl, byte [0x140043d31]
je 0x140012407
movzx r8d, word [r14]
cmp word [rax], r8w
jne 0x14001259b
mov rdi, rax
nop
lea rdx, [rdx + 2]
movzx ecx, word [rdx]
test cx, cx
je 0x1400125ad
add rax, 2
cmp word [rax], cx
je 0x140012580
mov rax, rdi
mov rdx, r14
add rax, 2
movzx ecx, byte [rax + 1]
or cl, byte [rax]
je 0x140012407
jmp 0x140012575
test rdi, rdi
je 0x140012407
mov rax, r9
xor ecx, ecx
nop dword [rax + rax]
cmp byte [rax], 0
jne 0x1400125cb
cmp byte [rax + 1], 0
je 0x1400125d3
add rax, 2
inc ecx
jmp 0x1400125c0
add cx, cx
add word [0x140042d64], cx
mov word [rdi], 0
add rdi, 2
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.14002a550
test ax, ax
je 0x140012da4
movzx eax, ax
add rdi, rax
lea rdx, [rsp + 0x54]
mov rcx, rdi
call fcn.14002a550
test ax, ax
je 0x140012407
movzx eax, ax
add rdi, rax
lea rdx, [rsp + 0x58]
mov rcx, rdi
call fcn.14002a550
test ax, ax
je 0x140012407
movzx ecx, ax
add rcx, rdi
lea rdx, [rsp + 0x40]
call fcn.14002a550
test ax, ax
je 0x140012407
xor eax, eax
movzx edx, ax
movzx r9d, word [rsp + 0x50]
movzx edi, word [rsp + 0x54]
movzx r8d, word [rsp + 0x58]
movzx r10d, word [rsp + 0x40]
movzx ecx, word [0x14003ee64]
cmp ax, cx
jge 0x1400126a6
mov rax, qword [rsp + 0x70]
add rax, 4
nop
cmp word [rax - 4], di
jne 0x14001269a
cmp word [rax - 2], r9w
jne 0x14001269a
cmp word [rax], r8w
jne 0x14001269a
cmp word [rax + 2], r10w
je 0x1400126a6
add rax, 0xa
inc dx
cmp dx, cx
jl 0x140012680
mov word [rsp + 0x30], r8w
mov word [rsp + 0x28], di
mov word [rsp + 0x20], r10w
call fcn.140012ed0
test ax, ax
jne 0x140012407
movsx r8d, word [0x140042d78]
mov ecx, 0x1fe
sub ecx, r8d
movsxd r9, dword [0x140042d58]
cmp r9d, ecx
jge 0x140012700
inc r8w
lea rcx, [0x140042e00]
add rcx, r9
call fcn.1400134f0
mov esi, 1
xor edi, edi
jmp 0x140012abe
movzx ecx, word [0x140042d74]
cmp cx, word [0x140042d68]
cmovl cx, word [0x140042d68]
mov word [0x140042d74], cx
xor ebp, ebp
mov word [0x140042d68], bp
movzx ecx, word [0x140042d6c]
cmp cx, word [0x140042d64]
cmovl cx, word [0x140042d64]
mov word [0x140042d6c], cx
mov word [0x140042d64], bp
movzx ecx, word [0x140042d60]
lea r10, [0x140042e00]
movzx edx, word [0x140042d50]
cmp word [0x140042b48], bp
je 0x14001278d
or byte [r9 + r10], 0xf
inc r9d
mov dword [0x140042d58], r9d
test cx, cx
je 0x140012786
inc dx
mov word [0x140042d50], dx
mov word [0x140042b48], bp
test cx, cx
je 0x1400127d4
cmp word [0x140043080], bp
je 0x1400127be
movsx eax, word [0x140042d5c]
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 0x1400127cd
movsx ecx, word [0x140042d5c]
movsx eax, dx
add ecx, eax
sub r9d, ecx
mov dword [0x140042d58], r9d
cmp r9d, 0x200
jge 0x1400127fe
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 [0x140042d58], r9d
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x4c]
mov r8d, 0x200
mov rdx, r10
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140012854
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x14001283b
mov eax, eax
lea rcx, [0x140000000]
mov ecx, dword [rcx + rax*4 + 0x310a0]
jmp 0x14001283d
mov ecx, ebx
mov dword [0x1400430b8], ecx
mov dword [0x1400434c8], 2
mov byte [0x1400433c0], bpl
cmp dword [rsp + 0x4c], 0x200
jne 0x140012d9d
mov esi, ebp
movzx edi, word [0x14003e0f8]
inc di
mov word [0x14003e0f8], di
cmp di, r15w
jb 0x1400128ef
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 0x140012b34
movzx edx, dx
mov rcx, qword [0x14003e0f0]
call qword [sym.imp.MSVCR120.dll_realloc]
mov r8, rax
mov qword [0x14003e0f0], rax
test rax, rax
je 0x140012407
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 [0x14003e0f8]
jmp 0x1400128f6
mov r8, qword [0x14003e0f0]
movzx edx, bp
movzx eax, byte [0x140043d30]
cmp byte [0x140043000], al
jne 0x14001294c
mov rcx, rbp
lea r9, [0x140043d30]
lea r10, [0x140043000]
nop dword [rax]
movzx eax, byte [rcx + r9 + 1]
cmp byte [rcx + r10 + 1], al
jne 0x14001294c
cmp byte [rcx + r10], sil
jne 0x140012939
cmp byte [rcx + r9], sil
je 0x14001294c
add rcx, 2
add dx, 2
movzx eax, byte [rcx + r9]
cmp byte [rcx + r10], al
je 0x140012920
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 + 0x44]
mov word [r8 + rcx*2], ax
movzx ecx, word [0x14003e0f8]
mov rdx, qword [0x14003e0f0]
movzx ebp, word [rdx + rcx*2]
add bp, bx
cmp bp, word [rsp + 0x68]
jbe 0x140012a0f
movzx edi, word [rsp + 0x46]
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 0x140012b34
movzx edx, dx
mov rcx, qword [0x14003e0e8]
call qword [sym.imp.MSVCR120.dll_realloc]
mov rdi, rax
mov qword [0x14003e0e8], rax
test rax, rax
je 0x140012407
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 + 0x46], r8w
movzx ecx, word [0x14003e0f8]
mov rdx, qword [0x14003e0f0]
jmp 0x140012a16
mov rdi, qword [0x14003e0e8]
movzx eax, cx
movsx rcx, word [rdx + rax*2]
add rcx, rdi
movzx r8d, bx
call fcn.1400136d0
test ax, ax
je 0x140012407
movzx ecx, word [0x14003e0f8]
mov rax, qword [0x14003e0f0]
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 + 0x44], bx
xor edi, edi
mov dword [0x140042d58], edi
lea r8d, [rdi + 1]
mov rcx, r12
cmp word [0x140042d60], si
movsx edx, word [0x140042d70]
jne 0x140012a86
movsx edx, word [0x14003ee54]
neg edx
call fcn.14002ad10
cmp eax, 0xffffffff
je 0x14001231f
mov word [0x140042d70], di
mov word [0x140042d60], di
mov word [0x140043080], di
mov word [0x140042d50], di
mov word [0x140043d30], si
mov ebx, 0x106
lea r9, [0x140043d30]
mov rcx, r9
lea rax, [0x140043000]
mov rdx, rax
movzx eax, byte [rcx]
test al, al
jne 0x140012ade
cmp byte [rcx + 1], al
je 0x140012af1
mov byte [rdx], al
movzx eax, byte [rcx + 1]
mov byte [rdx + 1], al
add rdx, 2
add rcx, 2
jmp 0x140012ad2
movzx eax, byte [rcx]
mov byte [rdx], al
movzx eax, byte [rcx + 1]
mov byte [rdx + 1], al
mov word [0x140042d78], di
mov word [0x140042d54], di
mov edx, 0x800
mov r8, r12
mov rcx, r9
call fcn.14002a640
test ax, ax
jle 0x140012b3e
mov rsi, qword [rsp + 0x60]
jmp 0x1400124c2
mov eax, 0xfffffffc
jmp 0x140012de6
mov eax, 0xfffffffb
jmp 0x140012de6
test si, si
je 0x140012dbe
movzx r9d, word [0x14003e0f8]
inc r9w
mov word [0x14003e0f8], r9w
cmp r9w, r15w
mov r15d, 0x7d00
jb 0x140012bb3
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 0x140012b34
movzx edx, dx
mov rcx, qword [0x14003e0f0]
call qword [sym.imp.MSVCR120.dll_realloc]
mov r10, rax
mov qword [0x14003e0f0], rax
test rax, rax
je 0x140012407
movzx r9d, word [0x14003e0f8]
jmp 0x140012bba
mov r10, qword [0x14003e0f0]
lea rsi, [0x140042e00]
cmp word [0x140042b48], 0
je 0x140012bfb
movsxd r8, dword [0x140042d58]
or byte [r8 + rsi], 0xf
inc r8d
mov dword [0x140042d58], r8d
cmp word [0x140042d60], 0
je 0x140012bf2
inc word [0x140042d50]
mov word [0x140042b48], di
jmp 0x140012c02
mov r8d, dword [0x140042d58]
cmp r8d, 0x200
jge 0x140012c2e
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 [0x140042d58], r8d
xor edi, edi
movzx edx, di
movzx eax, byte [0x140043d30]
cmp byte [0x140043000], al
jne 0x140012c7c
mov rcx, rdi
lea rdi, [0x140043d30]
lea r8, [0x140043000]
movzx eax, byte [rcx + rdi + 1]
cmp byte [rcx + r8 + 1], al
jne 0x140012c7c
cmp byte [rcx + r8], 0
jne 0x140012c6a
cmp byte [rcx + rdi], 0
je 0x140012c7c
add rcx, 2
add dx, 2
movzx eax, byte [rcx + rdi]
cmp byte [rcx + r8], al
je 0x140012c51
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 + 0x44]
mov word [r10 + rcx*2], ax
movzx ecx, word [0x14003e0f8]
mov rdi, qword [0x14003e0f0]
movzx ebp, word [rdi + rcx*2]
add bp, bx
cmp bp, word [rsp + 0x68]
jbe 0x140012d0f
movzx edi, word [rsp + 0x46]
mov eax, 0x66666667
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
add dx, di
cmp dx, r15w
ja 0x140012b34
movzx edx, dx
mov rcx, qword [0x14003e0e8]
call qword [sym.imp.MSVCR120.dll_realloc]
mov rdx, rax
mov qword [0x14003e0e8], rax
test rax, rax
je 0x140012407
movzx ecx, word [0x14003e0f8]
mov rdi, qword [0x14003e0f0]
jmp 0x140012d16
mov rdx, qword [0x14003e0e8]
movzx eax, cx
movsx rcx, word [rdi + rax*2]
add rcx, rdx
movzx r8d, bx
call fcn.1400136d0
test ax, ax
je 0x140012407
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x4c]
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 0x140012d93
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x140012d77
mov eax, eax
lea rcx, [0x140000000]
mov ecx, dword [rcx + rax*4 + 0x310a0]
jmp 0x140012d7c
mov ecx, 0x106
mov dword [0x1400430b8], ecx
mov dword [0x1400434c8], 2
mov byte [0x1400433c0], dil
cmp dword [rsp + 0x4c], 0x200
je 0x140012dc3
mov eax, 0xfffffffe
jmp 0x140012de6
movzx eax, byte [rdi]
sub al, 0x30
cmp al, 9
ja 0x140012db7
cmp byte [rdi + 1], 0
je 0x140012407
mov eax, 0xfffffff9
jmp 0x140012de6
mov rsi, qword [rsp + 0x60]
mov word [0x14003e0fa], bp
mov rcx, r14
call qword [sym.imp.MSVCR120.dll_free]
mov rcx, r12
call fcn.14002a9e0
mov rcx, rsi
call fcn.14002a9e0
movzx eax, di
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14002c960
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