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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov eax, dword [0x5fd9cc]
mov dword [0x572230], eax
cmp dword [0x5fdbac], 7
jne 0x4e8804
mov dword [0x600c4c], 1
jmp 0x4e911a
mov dword [0x600c4c], 0
cmp dword [0x5fdbac], 0x270f
jne 0x4e882e
mov dword [0x5fdbb0], 0
mov dword [0x5fdbac], 0
mov dword [0x5fb734], 0
push 0x5fb850
push 0x5fbc50
call fcn.00532580
add esp, 8
mov ecx, dword [0x5fdb48]
mov edx, dword [ecx*4 + 0x65bea0]
movsx eax, byte [edx + 1]
sub eax, 0x30
mov dword [0x600c48], eax
cmp dword [0x600c48], 0
jle 0x4e8875
cmp dword [0x600c48], 9
jle 0x4e887f
mov dword [0x600c48], 0
fldz
fstp dword [0x5fd98c]
mov dword [0x600c40], 0
call fcn.00483eb0
fadd qword [0x54d170]
fstp dword [ebp - 0x10]
mov ecx, dword [0x5fdb48]
mov dword [ebp - 0xc], ecx
mov dword [0x5fdb90], 0
cmp dword [0x5fdae8], 0
je 0x4e8918
cmp dword [0x5fdbac], 0
jne 0x4e8918
cmp dword [0x658f10], 0
jne 0x4e8918
cmp dword [0x5fdb94], 1
jne 0x4e8902
cmp dword [0x573ddc], 1
jne 0x4e8902
call fcn.004bcdf0
call fcn.004bdd80
cmp dword [0x5fdbac], 0
jne 0x4e88fb
cmp dword [0x5fdb90], 0
je 0x4e8900
jmp 0x4e8d5c
jmp 0x4e8916
push 0
call fcn.004f4810
add esp, 4
mov dword [0x658f94], 0
jmp 0x4e8922
mov dword [0x658f94], 0
cmp dword [0x658f10], 0x3e8
jle 0x4e8940
mov edx, dword [0x658f10]
sub edx, 0x3e8
mov dword [0x658f10], edx
cmp dword [ebp + 8], 1
jne 0x4e8f43
cmp dword [0x5fdae4], 1
jne 0x4e896b
cmp dword [0x5fd96c], 0
jne 0x4e896b
mov dword [0x5fdc38], 0x64
jmp 0x4e905c
mov dword [0x5fd7dc], 1
call fcn.004bcdf0
cmp dword [0x5fdbac], 0
jne 0x4e8997
mov eax, dword [0x5fdbb0]
mov dword [0x5fdbac], eax
mov dword [0x5fdbb0], 0
mov dword [0x5fdbdc], 0
push 0x576724
mov ecx, dword [0x5fdb48]
mov edx, dword [ecx*4 + 0x65bea0]
add edx, 2
push edx
call fcn.00532680
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4e89dc
mov eax, dword [0x5fdb48]
mov ecx, dword [eax*4 + 0x65bea0]
movsx edx, byte [ecx + 1]
test edx, edx
jne 0x4e8a0b
push 0xff
push 3
mov eax, dword [0x5fdb48]
mov ecx, dword [eax*4 + 0x65bea0]
push ecx
call fcn.004a7d70
add esp, 0xc
push eax
call fcn.00535089
add esp, 4
mov dword [0x5fdbd8], eax
jmp 0x4e8a91
mov edx, dword [ebp - 4]
movsx eax, byte [edx + 1]
cmp eax, 0x61
jl 0x4e8a66
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx + 1]
cmp edx, 0x7a
jg 0x4e8a66
mov dword [ebp - 0x14], 1
mov eax, dword [ebp - 4]
movsx ecx, byte [eax + 1]
mov eax, dword [ecx*4 + 0x658d9c]
cdq
mov ecx, 0xa
idiv ecx
mov dword [0x5fdbd8], eax
cmp dword [0x5fdbd8], 0
jl 0x4e8a5a
cmp dword [0x5fdbd8], 0x4e20
jle 0x4e8a64
mov dword [0x5fdbd8], 0x3e8
jmp 0x4e8a91
push 0xff
push 3
mov edx, dword [0x5fdb48]
mov eax, dword [edx*4 + 0x65bea0]
push eax
call fcn.004a7d70
add esp, 0xc
push eax
call fcn.00535089
add esp, 4
mov dword [0x5fdbd8], eax
cmp dword [0x5fdbd8], 0
je 0x4e8aad
cmp dword [0x5fda80], 1
jne 0x4e8aad
mov dword [0x5fdbd8], 0x12c
cmp dword [0x5fdbd8], 0
je 0x4e8ae8
mov dword [0x5fdbdc], 1
call fcn.00483eb0
mov eax, dword [0x5fdbd8]
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x20], eax
fiadd dword [ebp - 0x20]
fstp dword [0x5fd98c]
mov dword [0x5fd88c], 0x18
cmp dword [0x5fdbdc], 1
jne 0x4e8b22
movsx edx, word [0x65bdd6]
cmp edx, 5
jg 0x4e8b22
cmp dword [ebp - 0x14], 0
jne 0x4e8b22
call fcn.00483eb0
fild dword [0x5fdbd8]
fmul dword [0x5fdb7c]
fdiv qword [0x54b670]
faddp st(1)
fstp dword [0x5fd98c]
cmp dword [0x658f10], 0
jne 0x4e8b3f
push ecx
fld dword [0x5fd98c]
fstp dword [esp]
push 1
call fcn.004e85b0
add esp, 8
cmp dword [0x56f5e0], 0
je 0x4e8ba4
movsx eax, byte [0x5fb861]
cmp eax, 0x44
jne 0x4e8ba4
mov dword [0x600c44], 1
cmp dword [0x601398], 1
jne 0x4e8b90
mov ecx, dword [0x601384]
push ecx
mov edx, dword [0x601380]
push edx
call fcn.004d7ca0
add esp, 8
mov dword [0x5fd178], eax
mov eax, dword [0x5fd178]
push eax
call fcn.004a8690
add esp, 4
mov dword [0x658f10], 0
mov dword [0x5fdbac], 0
cmp dword [0x5fdbdc], 0
je 0x4e8d38
cmp dword [0x5fb730], 1
jne 0x4e8bf7
call fcn.00483eb0
fild dword [0x5fdbd8]
fmul dword [0x5fdb7c]
fdiv qword [0x54b670]
faddp st(1)
fstp dword [0x5fd98c]
mov dword [0x5fb730], 0
push ecx
fld dword [0x5fd98c]
fstp dword [esp]
push 1
call fcn.004e85b0
add esp, 8
call fcn.00483eb0
fsubr dword [0x5fd98c]
fstp dword [0x5fdbe4]
fld dword [0x5fdbe4]
fcomp qword [0x54b688]
fnstsw ax
test ah, 5
jp 0x4e8c23
fldz
fstp dword [0x5fdbe4]
fld dword [0x5fdbe4]
fcomp qword [0x54d290]
fnstsw ax
test ah, 0x41
jne 0x4e8c4c
call fcn.00483eb0
fadd qword [0x54d170]
fstp dword [0x5fd98c]
jmp 0x4e8bb1
fld dword [0x5fdbe4]
call fcn.00532f90
cmp eax, dword [ebp - 0x18]
je 0x4e8caf
mov dword [0x5fd88c], 0x18
fld dword [0x5fdbe4]
call fcn.00532f90
mov dword [ebp - 0x18], eax
fld dword [0x5fdbe4]
call fcn.00532f90
push eax
push 0x576728
push 0x6596e0
call fcn.00532706
add esp, 0xc
cmp dword [0x658f10], 0
jne 0x4e8caf
push ecx
fld dword [0x5fd98c]
fstp dword [esp]
push 0
call fcn.004e85b0
add esp, 8
mov dword [0x5fd88c], 0xffffffff
fld dword [0x5fdbe4]
fcomp qword [0x54b688]
fnstsw ax
test ah, 0x44
jnp 0x4e8cd5
cmp dword [0x600c40], 1
jne 0x4e8d36
cmp dword [0x600c44], 1
jne 0x4e8d08
cmp dword [0x601398], 1
jne 0x4e8d08
call fcn.00483eb0
fild dword [0x5fdbd8]
fmul dword [0x5fdb7c]
fdiv qword [0x54b670]
faddp st(1)
fstp dword [0x5fd98c]
jmp 0x4e8d36
cmp dword [0x5fd87c], 0
je 0x4e8d18
call fcn.004eabd0
jmp 0x4e8d31
mov dword [0x5fd7dc], 0
mov ecx, dword [0x5fdc38]
add ecx, 1
mov dword [0x5fdc38], ecx
jmp 0x4e905c
jmp 0x4e8d5c
call fcn.00483eb0
fld dword [ebp - 0x10]
fcompp
fnstsw ax
test ah, 5
jp 0x4e8d5c
cmp dword [0x5fd87c], 0
je 0x4e8d5c
call fcn.004eabd0
jmp 0x4e905c
cmp dword [0x5fdbac], 0
jne 0x4e8d6e
cmp dword [0x5fb734], 1
jne 0x4e8dac
push 2
call fcn.004b8e70
add esp, 4
mov edx, dword [ebp - 0xc]
cmp edx, dword [0x5fdb48]
je 0x4e8d8f
mov dword [ebp - 8], 1
jmp 0x4e905c
cmp dword [0x5fdb90], 0
je 0x4e8da7
mov eax, dword [0x5fdb90]
mov dword [0x5fdb48], eax
jmp 0x4e905c
jmp 0x4e8eaa
cmp dword [0x5fdbac], 0
jne 0x4e8dfa
push 1
call fcn.0048b130
add esp, 4
push 1
call fcn.004b8e70
add esp, 4
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [0x5fdb48]
je 0x4e8de0
mov dword [ebp - 8], 1
jmp 0x4e905c
cmp dword [0x5fdb90], 0
je 0x4e8dfa
mov edx, dword [0x5fdb90]
mov dword [0x5fdb48], edx
jmp 0x4e905c
cmp dword [0x5fdb48], 0
je 0x4e8e0c
cmp dword [0x5fdb24], 1
jne 0x4e8e3d
mov dword [0x600c44], 0
mov dword [0x600c50], 0
push 1
call fcn.004f3670
add esp, 4
push 3
push 1
push 0x12
call fcn.004d7db0
add esp, 0xc
jmp 0x4e911a
cmp dword [0x5fda70], 0
jne 0x4e8e93
cmp dword [0x5fda4c], 0
jne 0x4e8e93
cmp dword [0x658f84], 0xa
jne 0x4e8e93
mov dword [0x658f84], 0
mov dword [0x600c44], 0
mov dword [0x600c50], 0
push 1
call fcn.004f3670
add esp, 4
push 3
push 1
push 0x12
call fcn.004d7db0
add esp, 0xc
jmp 0x4e911a
cmp dword [0x5fdbac], 0
jne 0x4e8eaa
cmp dword [0x658f10], 0
jne 0x4e8eaa
jmp 0x4e8ba4
mov dword [0x5fd7dc], 0
cmp dword [0x5fdbac], 0x5f
jl 0x4e8f43
cmp dword [0x5fdbac], 0xa4
jg 0x4e8f43
mov eax, dword [0x5fdbac]
mov ecx, dword [eax*4 + 0x658c80]
push ecx
push 2
push 1
push 0x70e258
call fcn.004a8280
add esp, 0x10
mov edx, dword [0x5fd90c]
mov dword [0x5fd908], edx
push 1
call fcn.004c5a90
add esp, 4
mov eax, dword [0x5fd908]
mov dword [0x5fd90c], eax
mov dword [0x5fd9e0], 1
call fcn.004bdc60
call fcn.004f2160
push 0
call fcn.004cab50
add esp, 4
cmp dword [0x5fdbac], 0x80
jg 0x4e8ecd
cmp dword [0x5fdbac], 0
jne 0x4e8f43
jmp 0x4e8aad
cmp dword [0x5fdbac], 1
jne 0x4e8f57
cmp dword [0x5fdae4], 1
jne 0x4e8f57
jmp 0x4e8fcc
cmp dword [0x5fdbac], 9
jge 0x4e8f69
cmp dword [0x5fdbac], 1
jge 0x4e8f72
cmp dword [0x5fdbac], 0x62
jne 0x4e8fcc
cmp dword [0x5fd9f0], 4
je 0x4e8f89
push 3
push 1
push 0x12
call fcn.004d7db0
add esp, 0xc
mov dword [0x600c44], 0
movsx ecx, word [0x600434]
test ecx, ecx
je 0x4e8fb3
cmp dword [0x5fdbac], 8
je 0x4e8fb1
mov dword [0x600c50], 0
jmp 0x4e8fbd
mov dword [0x600c50], 0
push 1
call fcn.004f3670
add esp, 4
jmp 0x4e911a
cmp dword [ebp - 8], 0
jne 0x4e8fe9
lea edx, [ebp - 0x1c]
push edx
push 0
mov eax, dword [0x5fdaec]
push eax
call fcn.004b98c0
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 0x1c], 0
jne 0x4e9033
call fcn.004ae570
push 0x57672c
mov ecx, dword [0x5fdb48]
mov edx, dword [ecx*4 + 0x65bea4]
push edx
call fcn.005327a0
add esp, 8
test eax, eax
jne 0x4e8fef
mov eax, dword [ebp - 0xc]
mov dword [0x5fdb48], eax
mov ecx, dword [0x572230]
mov dword [0x5fd9cc], ecx
mov dword [ebp - 8], 0
jmp 0x4e8ba4
cmp dword [ebp - 8], 0
jne 0x4e903e
call fcn.004b9fa0
cmp dword [ebp - 8], 0
jne 0x4e905c
cmp dword [0x658f10], 0
je 0x4e905c
mov edx, dword [0x658f10]
push edx
call fcn.004ba2f0
add esp, 4
mov dword [0x5fd988], 0
push 0x14
push 4
call fcn.004bd160
add esp, 8
push 0x1f7
push str.Wait_Touch
call fcn.004b8dc0
add esp, 8
mov dword [0x5fd7dc], 0
mov dword [0x5fdbac], 0
mov dword [0x658f10], 0
cmp dword [0x5fd9f0], 4
je 0x4e90e4
push 2
call fcn.004b50c0
add esp, 4
cmp dword [0x5fdc24], 0
je 0x4e90c8
push 1
call fcn.004b57d0
add esp, 4
cmp dword [0x5fd7ac], 0
je 0x4e90d6
call fcn.004b5c60
push 3
push 1
push 0x12
call fcn.004d7db0
add esp, 0xc
push 1
call fcn.004bc3f0
add esp, 4
cmp dword [0x5fd8a4], 1
jne 0x4e90fc
call fcn.004bbc90
mov dword [0x600c44], 0
mov dword [0x600c50], 0
push 1
call fcn.004f3670
add esp, 4
mov esp, ebp
pop ebp
ret