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

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x50]
push ebx
push ebp
mov ebp, dword [esp + 0x48]
push esi
xor esi, esi
push edi
xor edi, edi
cmp eax, esi
mov dword [esp + 0x10], esi
jge 0x5a0f73
mov dword [esp + 0x60], 6
fld qword [esp + 0x54]
fld qword [esp + 0x54]
fcomp qword [0x6bee80]
fnstsw ax
test ah, 5
jp 0x5a0f9a
fstp st(0)
mov dword [esp + 0x10], 0x2d
fld qword [esp + 0x54]
fchs
jmp 0x5a0fb8
mov al, byte [esp + 0x64]
test al, 2
je 0x5a0fac
mov dword [esp + 0x10], 0x2b
jmp 0x5a0fb8
test al, 4
je 0x5a0fb8
mov dword [esp + 0x10], 0x20
fld st(0)
call fcn.005ed676
mov ebx, eax
mov eax, dword [esp + 0x60]
cmp eax, 9
mov dword [esp + 0x14], ebx
jle 0x5a0fda
mov dword [esp + 0x60], 9
mov eax, dword [esp + 0x60]
test eax, eax
fld qword [0x6beec8]
je 0x5a0fed
dec eax
fmul qword [0x699280]
jne 0x5a0fe4
fld st(0)
call fcn.005ed676
mov dword [esp + 0x54], eax
fild dword [esp + 0x54]
fsubr st(1)
fcomp qword [0x6beec0]
fnstsw ax
fstp st(0)
test ah, 1
jne 0x5a1011
inc dword [esp + 0x54]
mov eax, dword [esp + 0x60]
fld qword [0x6beec8]
test eax, eax
je 0x5a1029
nop
dec eax
fmul qword [0x699280]
jne 0x5a1020
fild dword [esp + 0x14]
fsubp st(2)
fxch st(1)
fmulp st(1)
fld st(0)
call fcn.005ed676
mov ecx, eax
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fsubr st(1)
fcomp qword [0x6beec0]
fnstsw ax
fstp st(0)
test ah, 1
jne 0x5a1056
inc ecx
mov eax, dword [esp + 0x54]
cmp ecx, eax
jl 0x5a1061
inc ebx
sub ecx, eax
mov eax, ebx
cdq
mov ebx, 0xa
idiv ebx
inc edi
mov dl, byte [edx + 0x693278]
mov byte [esp + edi + 0x17], dl
mov ebx, eax
test ebx, ebx
je 0x5a1081
cmp edi, 0x14
jl 0x5a1061
cmp edi, 0x14
jne 0x5a108b
mov edi, 0x13
mov byte [esp + edi + 0x18], 0
mov eax, ecx
cdq
mov ecx, 0xa
idiv ecx
inc esi
mov dl, byte [edx + 0x693278]
mov byte [esp + esi + 0x2b], dl
mov ecx, eax
cmp esi, dword [esp + 0x60]
jl 0x5a1090
cmp esi, 0x14
jne 0x5a10b7
mov esi, 0x13
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x5c]
xor edx, edx
xor ebx, ebx
cmp ecx, ebx
setne dl
mov byte [esp + esi + 0x2c], 0
sub eax, edx
mov edx, dword [esp + 0x60]
sub eax, edi
sub eax, edx
dec eax
sub edx, esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x14], edx
jns 0x5a10e8
mov dword [esp + 0x14], ebx
cmp eax, ebx
jge 0x5a10f2
mov dword [esp + 0x5c], ebx
mov eax, ebx
mov dl, byte [esp + 0x64]
test dl, 1
je 0x5a1101
neg eax
mov dword [esp + 0x5c], eax
test dl, 0x10
je 0x5a1176
cmp eax, ebx
jle 0x5a11ae
cmp ecx, ebx
je 0x5a113f
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x48]
push ebp
push eax
push ecx
call fcn.005a0b60
mov eax, dword [esp + 0x6c]
add esp, 0x10
dec eax
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x5c], eax
test eax, eax
jle 0x5a11ae
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
nop
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
push 0x30
push ebp
push edx
push eax
call fcn.005a0b60
mov eax, dword [esp + 0x64]
add esp, 0x10
dec eax
mov dword [esp + 0x54], eax
jne 0x5a1150
jmp 0x5a11a6
cmp eax, ebx
jle 0x5a11ae
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], ebx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
push 0x20
push ebp
push ecx
push edx
call fcn.005a0b60
mov eax, dword [esp + 0x64]
add esp, 0x10
dec eax
mov dword [esp + 0x54], eax
jne 0x5a1182
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x5c]
test ecx, ecx
je 0x5a11ce
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x48]
push ebp
push eax
push ecx
call fcn.005a0b60
mov eax, dword [esp + 0x6c]
add esp, 0x10
test edi, edi
jle 0x5a11f8
movsx edx, byte [esp + edi + 0x17]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
dec edi
push edx
push ebp
push eax
push ecx
call fcn.005a0b60
add esp, 0x10
test edi, edi
jg 0x5a11d2
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
test ecx, ecx
jg 0x5a1207
test byte [esp + 0x64], 8
je 0x5a1244
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
push 0x2e
push ebp
push edi
push edx
call fcn.005a0b60
add esp, 0x10
test esi, esi
jle 0x5a123e
movsx eax, byte [esp + esi + 0x2b]
mov ecx, dword [esp + 0x44]
dec esi
push eax
push ebp
push edi
push ecx
call fcn.005a0b60
add esp, 0x10
test esi, esi
jg 0x5a1224
mov eax, dword [esp + 0x5c]
jmp 0x5a124c
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x14]
test esi, esi
jle 0x5a126c
mov edx, dword [esp + 0x44]
push 0x30
push ebp
push edi
push edx
call fcn.005a0b60
add esp, 0x10
dec esi
jne 0x5a1254
mov eax, dword [esp + 0x5c]
test eax, eax
jge 0x5a1288
neg eax
mov esi, eax
mov eax, dword [esp + 0x44]
push 0x20
push ebp
push edi
push eax
call fcn.005a0b60
add esp, 0x10
dec esi
jne 0x5a1274
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret