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

Disassembly:
push 0xffffffffffffffff
push 0x4c5008
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4f2fb0]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
lea ecx, [esp + 0x44]
mov dword [esp + 0x3c], 1
call fcn.00404690
lea ecx, [esp + 0x48]
call fcn.00404690
call fcn.004835e8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x479a7b
push 0x80004005
call fcn.00401260
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x3c], 2
call fcn.004835e8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x479aaa
push 0x80004005
call fcn.00401260
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov esi, esp
push eax
mov byte [esp + 0x44], 3
call fcn.00401540
lea ecx, [esp + 0x2c]
add esp, 4
add eax, 0x10
push ecx
mov dword [esi], eax
call fcn.00478e10
add esp, 8
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x40], 4
call fcn.004017f0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479b1c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
mov edx, dword [eax - 0xc]
lea ecx, [edx - 1]
test ecx, ecx
jl 0x479e91
cmp ecx, edx
jg 0x479e91
movsx ebp, byte [ecx + eax]
mov eax, edx
dec eax
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x4c]
sub ebp, 0x30
call fcn.00445940
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x40], 5
call fcn.004017f0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479b83
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
push eax
call fcn.00401540
add eax, 0x10
add esp, 4
mov dword [esp + 0x24], eax
mov byte [esp + 0x3c], 6
call fcn.004835e8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x479bb9
push 0x80004005
call fcn.00401260
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 8
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x44], 7
call fcn.00445940
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x40], 8
call fcn.004017f0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479c12
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov esi, esp
push eax
call fcn.00401540
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004787d0
push ebp
mov ecx, eax
call fcn.00478630
xor ecx, eax
push 8
push ecx
lea ecx, [esp + 0x28]
push ecx
call fcn.004792a0
add esp, 0x14
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x40], 9
call fcn.004017f0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479c81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 4
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00445d80
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x40], 0xa
call fcn.004017f0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479cc5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov esi, esp
push eax
mov dword [esp + 0x38], eax
call fcn.00401540
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004787d0
push ebp
mov ecx, eax
call fcn.004786c0
xor ecx, eax
push 4
push ecx
lea ecx, [esp + 0x28]
push ecx
call fcn.004792a0
add esp, 0x14
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x44], 0xb
call fcn.00404550
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479d3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.004835e8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x479d58
push 0x80004005
call fcn.00401260
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x30], esp
mov ebx, 0xc
mov esi, esp
push eax
mov byte [esp + 0x44], bl
mov dword [esp + 0x34], eax
call fcn.00401540
lea ecx, [esp + 0x30]
add esp, 4
add eax, 0x10
push ecx
mov dword [esi], eax
call fcn.00478a60
add esp, 8
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x40], 0xd
call fcn.004017f0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x3c], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479dd1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
push 4
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x24]
call fcn.00478850
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x40], 0xe
call fcn.004017f0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x3c], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479e15
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x18]
call fcn.00404690
lea ecx, [esp + 0x14]
call fcn.00404690
mov ebx, dword [esp + 0x14]
xor edi, edi
xor esi, esi
cmp dword [ebx - 0xc], edi
jle 0x479e80
push 1
push esi
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x20]
call fcn.00478850
mov eax, dword [eax]
push eax
call fcn.00499e00
cdq
mov ecx, 0xa
idiv ecx
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
add esp, 4
or ecx, 0xffffffff
add edi, edx
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x479e7a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc esi
cmp esi, dword [ebx - 0xc]
jl 0x479e34
lea ecx, [ebp + 1]
imul ecx, edi
mov edi, dword [esp + 0x18]
mov esi, dword [edi - 0xc]
test esi, esi
jge 0x479e9b
push 0x80070057
call fcn.00401260
mov eax, dword [ebx - 0xc]
mov dl, byte [edi]
test eax, eax
jge 0x479eae
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx]
jne 0x47a380
cmp esi, 1
jge 0x479ec5
push 0x80070057
call fcn.00401260
cmp eax, 1
mov dl, byte [edi + 1]
jge 0x479ed7
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 1]
jne 0x47a33c
cmp esi, 2
jge 0x479eef
push 0x80070057
call fcn.00401260
cmp eax, 2
mov dl, byte [edi + 2]
jge 0x479f01
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 2]
jne 0x47a2fd
cmp esi, 3
jge 0x479f19
push 0x80070057
call fcn.00401260
cmp eax, 3
mov dl, byte [edi + 3]
jge 0x479f2b
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 3]
jne 0x47a2bd
cmp esi, 4
jge 0x479f43
push 0x80070057
call fcn.00401260
cmp eax, 4
mov dl, byte [edi + 4]
jge 0x479f55
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 4]
jne 0x47a27e
cmp esi, 5
jge 0x479f6d
push 0x80070057
call fcn.00401260
cmp eax, 5
mov dl, byte [edi + 5]
jge 0x479f7f
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 5]
jne 0x47a23d
cmp esi, 6
jge 0x479f97
push 0x80070057
call fcn.00401260
cmp eax, 6
mov dl, byte [edi + 6]
jge 0x479fa9
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 6]
jne 0x47a1fc
cmp esi, 7
jge 0x479fc1
push 0x80070057
call fcn.00401260
cmp eax, 7
mov dl, byte [edi + 7]
jge 0x479fd3
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 7]
jne 0x47a1bc
cmp esi, 8
jge 0x479feb
push 0x80070057
call fcn.00401260
cmp eax, 8
mov dl, byte [edi + 8]
jge 0x479ffd
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 8]
jne 0x47a17c
cmp esi, 9
jge 0x47a015
push 0x80070057
call fcn.00401260
cmp eax, 9
mov dl, byte [edi + 9]
jge 0x47a027
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 9]
jne 0x47a13c
cmp esi, 0xa
jge 0x47a03f
push 0x80070057
call fcn.00401260
cmp eax, 0xa
mov dl, byte [edi + 0xa]
jge 0x47a051
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 0xa]
jne 0x47a0fc
cmp esi, 0xb
jge 0x47a069
push 0x80070057
call fcn.00401260
cmp eax, 0xb
mov dl, byte [edi + 0xb]
jge 0x47a07b
push 0x80070057
call fcn.00401260
cmp dl, byte [ebx + 0xb]
jne 0x47a0c0
lea ecx, [ecx + ecx*2]
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a083
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
jne 0x47a083
jmp 0x47a3b3
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a0c0
jmp 0x47a3b3
add ecx, ecx
mov edi, edi
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a100
jmp 0x47a3b3
lea ecx, [ecx + ecx*2]
nop
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a140
jmp 0x47a3b3
add ecx, ecx
add ecx, ecx
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a180
jmp 0x47a3b3
lea ecx, [ecx + ecx*4]
nop
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a1c0
jmp 0x47a3b3
lea ecx, [ecx + ecx*2]
add ecx, ecx
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a201
jmp 0x47a3b3
lea ecx, [ecx + ecx*2]
add ecx, ecx
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a242
jmp 0x47a3b3
lea ecx, [ecx + ecx*4]
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a281
jmp 0x47a3b3
add ecx, ecx
add ecx, ecx
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a2c1
jmp 0x47a3b3
lea ecx, [ecx + ecx*2]
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a300
jmp 0x47a3b3
add ecx, ecx
mov edi, edi
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a340
jmp 0x47a3b3
mov esi, ecx
mov eax, 0x66666667
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
mov eax, esi
inc ecx
sub eax, edx
jne 0x47a3b3
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
je 0x47a380
lea eax, [edi - 0x10]
mov byte [esp + 0x3c], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a3d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x3c], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a3f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a41a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x3c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a43c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
mov byte [esp + 0x3c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a45e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a483
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47a4ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret