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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x3003a2ac]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push edi
mov dword [ebp - 0x6c], eax
mov ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push 0
push eax
call dword [ecx + 0x10]
mov edi, eax
mov dword [ebp - 0x48], edi
test edi, edi
je 0x3004fcd4
lea eax, [edi + 0x400]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
push esi
lea esi, [edi + 4]
test ax, ax
je 0x30041981
mov edi, dword [ebp + 0xc]
cmp ax, 0x25
je 0x300419e1
cmp esi, dword [ebp - 0x50]
jae 0x300500ea
mov ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 0xc]
movzx eax, word [eax]
test ax, ax
jne 0x30041950
mov edi, dword [ebp - 0x48]
cmp esi, dword [ebp - 0x50]
jae 0x30050118
xor eax, eax
mov word [esi], ax
inc esi
inc esi
sub esi, dword [ebp - 0x48]
sar esi, 1
add esi, 0xfffffffd
push esi
push dword [ebp - 0x6c]
call fcn.30010745
mov edi, eax
test edi, edi
jl 0x300419ba
mov eax, dword [ebp - 0x48]
push esi
add eax, 4
push eax
mov eax, dword [ebp - 0x6c]
push dword [eax]
call fcn.3000da9d
cmp dword [ebp - 0x48], 0
pop esi
je 0x300419cf
call fcn.30005f5a
push dword [ebp - 0x48]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.30002772
leave
ret 0xc
inc edi
inc edi
movzx eax, word [edi]
movzx ecx, ax
add ecx, 0xffffffd0
cmp ecx, 9
ja 0x3004195d
xor ecx, ecx
imul ecx, ecx, 0xa
movzx eax, ax
inc edi
inc edi
lea ecx, [ecx + eax - 0x30]
movzx eax, word [edi]
mov dword [ebp + 0xc], edi
cmp ax, 0x30
jae 0x30041ab6
cmp ecx, 1
jl 0x30041acd
cmp ecx, 0x63
jg 0x30041acd
dec ecx
cmp word [edi], 0x21
mov dword [ebp - 0x60], ecx
jne 0x30041aa4
xor edx, edx
mov dword [ebp - 0x58], edi
inc edi
inc edi
cmp word [edi], 0x2d
mov byte [ebp - 0x49], 0
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x68], edx
je 0x3004fcde
push 0x30
pop ecx
cmp word [edi], cx
je 0x3004fce9
movzx eax, word [edi]
cmp ax, cx
jb 0x30041a6c
cmp ax, 0x39
jbe 0x3004fcef
cmp word [edi], 0x2e
je 0x3004fd03
cmp edx, dword [ebp - 0x68]
jl 0x3004fd3c
movzx eax, word [edi]
inc edi
inc edi
cmp word [edi], 0x21
mov dword [ebp - 0x70], eax
jne 0x30041ac5
inc edi
inc edi
mov dword [ebp + 0xc], edi
cmp ax, 0x73
jne 0x3004fe6f
test edx, edx
jne 0x3004fd47
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov edi, dword [eax + ecx*4]
test edi, edi
jne 0x30041ad7
jmp 0x300500b2
cmp ax, 0x39
ja 0x30041a13
jmp 0x300419f7
mov eax, dword [ebp - 0x58]
mov dword [ebp + 0xc], eax
jmp 0x30041aa4
mov edi, 0x80004005
jmp 0x300419ba
cmp word [edi], 0
je 0x30041973
cmp esi, dword [ebp - 0x50]
jae 0x300500bc
mov ax, word [edi]
mov word [esi], ax
inc esi
inc esi
inc edi
inc edi
jmp 0x30041ad7
mov edi, 0x8007000e
jmp 0x300419cf
inc edi
inc edi
mov byte [ebp - 0x49], 1
jmp 0x30041a4e
mov byte [ebp - 0x61], 1
jmp 0x3004fcfc
imul edx, edx, 0xa
movzx eax, ax
lea edx, [edx + eax - 0x30]
mov dword [ebp - 0x54], edx
inc edi
inc edi
jmp 0x30041a5a
inc edi
inc edi
movzx eax, word [edi]
cmp ax, cx
jb 0x30041a76
cmp ax, 0x39
ja 0x30041a76
mov ecx, dword [ebp - 0x68]
imul ecx, ecx, 0xa
movzx eax, ax
inc edi
lea eax, [ecx + eax - 0x30]
inc edi
mov dword [ebp - 0x68], eax
movzx eax, word [edi]
cmp ax, 0x30
jb 0x30041a76
jmp 0x3004fd11
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x54], edx
jmp 0x30041a7f
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp + 0x10]
mov edi, dword [eax + ecx*4]
push edi
mov dword [ebp - 0x60], edi
call fcn.30005ae2
mov dword [ebp - 0x58], eax
test edi, edi
jne 0x3004fd67
mov dword [ebp - 0x60], 0x300214f8
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x3004fd76
cmp dword [ebp - 0x58], eax
jle 0x3004fd76
mov dword [ebp - 0x58], eax
cmp byte [ebp - 0x49], 0
je 0x3004fdbb
jmp 0x3004fdc3
cmp esi, dword [ebp - 0x50]
jb 0x3004fdb0
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x58]
jg 0x3004fd7e
xor edi, edi
cmp dword [ebp - 0x58], edi
jle 0x3004fe0e
cmp esi, dword [ebp - 0x50]
jb 0x3004fdfc
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x60]
mov ax, word [eax + edi*2]
mov word [esi], ax
inc esi
inc esi
inc edi
cmp edi, dword [ebp - 0x58]
jl 0x3004fdca
cmp byte [ebp - 0x49], 0
je 0x30041973
mov eax, dword [ebp - 0x58]
cmp dword [ebp - 0x54], eax
jle 0x30041973
cmp esi, dword [ebp - 0x50]
jb 0x3004fe56
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x58]
jle 0x30041973
jmp 0x3004fe24
cmp byte [ebp - 0x61], 0
mov byte [ebp - 0x59], 0
je 0x3004fe7c
mov dword [ebp - 0x68], edx
lea edi, [ebp - 0x44]
mov dword [ebp - 0x58], edi
cmp ax, 0x64
jne 0x3004fec5
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov eax, dword [eax + ecx*4]
test eax, eax
jne 0x3004fea1
push 0x30
pop eax
mov word [ebp - 0x44], ax
lea edi, [ebp - 0x42]
jmp 0x3004ff0a
jge 0x3004fea9
mov byte [ebp - 0x59], 1
neg eax
test eax, eax
jbe 0x3004ff0d
xor edx, edx
push 0xa
pop ecx
div ecx
add edx, 0x30
mov word [edi], dx
inc edi
inc edi
test eax, eax
ja 0x3004fead
mov edx, dword [ebp - 0x54]
jmp 0x3004ff0a
cmp ax, 0x78
je 0x3004fed1
cmp ax, 0x58
jne 0x3004ff0d
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
je 0x3004fe95
jbe 0x3004ff0d
mov eax, ecx
and eax, 0xf
shr ecx, 4
cmp eax, 9
jbe 0x3004fefe
cmp word [ebp - 0x70], 0x78
jne 0x3004fef9
add eax, 0x57
jmp 0x3004ff01
add eax, 0x37
jmp 0x3004ff01
add eax, 0x30
mov word [edi], ax
inc edi
inc edi
test ecx, ecx
ja 0x3004fee0
mov dword [ebp - 0x58], edi
mov eax, edi
lea ecx, [ebp - 0x44]
sub eax, ecx
sar eax, 1
cmp byte [ebp - 0x59], 0
je 0x3004ff1d
inc eax
mov ecx, dword [ebp - 0x68]
xor edi, edi
cmp eax, ecx
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x60], edi
jge 0x3004ff35
sub edx, ecx
sub ecx, eax
mov dword [ebp - 0x60], ecx
jmp 0x3004ff3b
cmp eax, edx
jge 0x3004ff3e
sub edx, eax
mov dword [ebp - 0x54], edx
cmp byte [ebp - 0x49], 0
jne 0x3004ff8b
cmp dword [ebp - 0x54], edi
je 0x3004ff8b
mov edi, 0x400
cmp esi, dword [ebp - 0x50]
jb 0x3004ff7c
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
je 0x3004ff90
jmp 0x3004ff4e
mov edi, 0x400
cmp byte [ebp - 0x59], 0
je 0x3004ffcc
cmp esi, dword [ebp - 0x50]
jb 0x3004ffc4
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x2d
pop eax
mov word [esi], ax
inc esi
inc esi
cmp dword [ebp - 0x60], 0
je 0x3005000d
cmp esi, dword [ebp - 0x50]
jb 0x30050000
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x30
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x60]
jne 0x3004ffd2
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x58], eax
jbe 0x30050059
sub dword [ebp - 0x58], 2
cmp esi, dword [ebp - 0x50]
jb 0x30050047
add ebx, edi
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x58]
mov cx, word [eax]
mov word [esi], cx
inc esi
lea ecx, [ebp - 0x44]
inc esi
cmp eax, ecx
ja 0x30050015
cmp byte [ebp - 0x49], 0
je 0x30041973
cmp dword [ebp - 0x54], 0
je 0x30041973
cmp esi, dword [ebp - 0x50]
jb 0x3005009f
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
push 0x20
pop eax
mov word [esi], ax
inc esi
inc esi
dec dword [ebp - 0x54]
je 0x30041973
jmp 0x3005006d
mov edi, 0x300214f8
jmp 0x30041ad7
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
jmp 0x30041aea
add ebx, 0x400
call fcn.30005f5a
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x48]
push eax
call dword [ecx + 0x10]
test eax, eax
je 0x3005012f
mov ecx, eax
sub ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
add esi, ecx
lea ecx, [eax + ebx]
mov dword [ebp - 0x50], ecx
jmp 0x30041966
call fcn.30005f5a
mov ecx, dword [eax]
add ebx, 0x400
push ebx
push edi
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x30050139
mov edi, 0x8007000e
jmp 0x300419ba
mov ecx, eax
sub ecx, edi
add esi, ecx
mov dword [ebp - 0x48], eax
jmp 0x3004198a