Function at 0x41f4a0
Capabilities:
Encode data using xor
Validate payment card number using luhn algorithm

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x4ff004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
push esi
mov esi, dword [ebp + 8]
test dx, dx
push edi
mov edi, ecx
mov word [ebp - 0x6a], dx
mov dl, byte [ebp - 0x40]
mov ecx, 2
cmovne eax, ecx
mov dword [ebp - 0x4c], edi
movzx ecx, ax
and edx, 0xfffffffe
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x48], edx
nop dword [eax + eax]
mov al, byte [esi]
mov dword [ebp - 0x50], ebx
xor ebx, ebx
mov dword [ebp - 0x70], ebx
test al, al
je 0x41fd55
cmp al, 0x25
je 0x41f50f
inc ecx
mov dword [ebp - 0x44], ecx
jmp 0x41fd3b
test dl, 1
je 0x41f530
mov eax, dword [ebp - 0x70]
cmp bx, ax
jbe 0x41f530
push dword [edi + 4]
movzx ecx, ax
mov edx, ebx
sub edx, eax
add ecx, esi
call fcn.0041ead0
add esp, 4
mov ecx, dword [ebp - 0x54]
inc ebx
movzx eax, bx
mov dword [ebp - 0x5c], ebx
mov byte [ebp - 0x55], 0x20
mov dl, byte [eax + ecx]
cmp dl, 0x30
jne 0x41f553
inc ebx
mov byte [ebp - 0x55], dl
movzx eax, bx
mov dword [ebp - 0x5c], ebx
mov dl, byte [eax + ecx]
xor edi, edi
mov dword [ebp - 0x60], edi
cmp dl, 0x30
jl 0x41f58d
nop dword [eax]
cmp dl, 0x39
jg 0x41f587
movsx ax, dl
lea ecx, [edi + edi*4]
add ecx, ecx
inc ebx
sub ax, 0x30
add cx, ax
movzx eax, bx
movzx edi, cx
mov ecx, dword [ebp - 0x54]
mov dl, byte [eax + ecx]
cmp dl, 0x30
jge 0x41f560
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], edi
cmp dl, 0x2e
jne 0x41f5ad
inc ebx
movzx eax, bx
mov dword [ebp - 0x5c], ebx
mov dl, byte [eax + ecx]
lea eax, [edx - 0x30]
cmp al, 4
ja 0x41f5ad
inc ebx
movzx eax, bx
mov dword [ebp - 0x5c], ebx
mov dl, byte [eax + ecx]
test dl, dl
je 0x41fd4c
mov ecx, dword [ebp - 0x48]
lea eax, [ebx + 1]
movzx eax, ax
and ecx, 0xfffffffd
mov dword [ebp - 0x70], eax
mov esi, 0x1c
movsx eax, dl
add eax, 0xffffffdb
mov dword [ebp - 0x48], ecx
mov byte [ebp - 0x40], cl
cmp eax, 0x54
ja case.0x41f5e5.38
movzx eax, byte [eax + 0x41fe50]
jmp dword [eax*4 + 0x41fe18]
mov edi, dword [ebp - 0x4c]
test cl, 1
je 0x41f625
mov byte [ebp - 0x40], 0x25
push dword [edi + 4]
call fcn.0041e9c0
add esp, 4
cmp ax, 1
jb 0x41fd32
push dword [edi + 4]
mov edx, 1
lea ecx, [ebp - 0x40]
call fcn.0041ead0
add esp, 4
jmp 0x41fd32
mov ecx, dword [ebp - 0x44]
inc ecx
mov dword [ebp - 0x44], ecx
jmp 0x41fd35
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x4c]
add eax, 4
mov dword [ebp - 0x50], eax
mov al, byte [eax - 4]
test cl, 1
je 0x41f625
mov byte [ebp - 0x40], al
jmp 0x41f5f8
mov esi, dword [ebp - 0x50]
add esi, 4
mov dword [ebp - 0x50], esi
mov eax, dword [esi - 4]
mov dword [ebp - 0x60], eax
cmp dl, 0x73
jne 0x41f7fb
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41f667
sub ecx, edx
mov eax, 0x800
mov edx, dword [ebp - 0x48]
movzx esi, cx
cmp si, ax
cmova esi, eax
test dl, 1
je 0x41f6cb
cmp di, si
jbe 0x41f6b3
mov dl, byte [ebp - 0x55]
sub edi, esi
push edi
mov edi, dword [ebp - 0x4c]
mov ecx, edi
call fcn.0041f180
mov ecx, dword [ebp - 0x60]
add esp, 4
mov edx, esi
push dword [edi + 4]
call fcn.0041ead0
add esp, 4
jmp 0x41fd32
mov edi, dword [ebp - 0x4c]
mov edx, esi
mov ecx, dword [ebp - 0x60]
push dword [edi + 4]
call fcn.0041ead0
add esp, 4
jmp 0x41fd32
cmp di, si
movzx ecx, di
mov edi, dword [ebp - 0x4c]
movzx eax, si
cmovbe ecx, eax
add word [ebp - 0x44], cx
mov ecx, dword [ebp - 0x44]
jmp 0x41fd38
mov eax, dword [ebp - 0x50]
add eax, 4
mov dword [ebp - 0x50], eax
movzx esi, word [eax - 4]
cmp si, word [0x4ffa60]
je 0x41f792
mov edi, dword [ebp - 0x4c]
mov bl, cl
and bl, 1
je 0x41f732
push dword [edi + 4]
call fcn.0041e9c0
add esp, 4
cmp ax, 9
jb 0x41f736
push dword [edi + 4]
mov edx, 9
mov ecx, str._bySerial
call fcn.0041ead0
add esp, 4
jmp 0x41f736
add dword [ebp - 0x44], 9
mov ecx, esi
test bl, bl
je 0x41f781
push 0x1b
lea edx, [ebp - 0x1f]
mov byte [ebp - 0x20], 0x2f
call fcn.004137e0
lea ecx, [ebp - 0x20]
add esp, 4
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41f753
push dword [edi + 4]
sub ecx, edx
movzx esi, cx
call fcn.0041e9c0
add esp, 4
cmp ax, si
jb 0x41f78c
push dword [edi + 4]
mov edx, esi
lea ecx, [ebp - 0x20]
call fcn.0041ead0
add esp, 4
jmp 0x41f78c
call fcn.004138e0
inc ax
add word [ebp - 0x44], ax
mov ebx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x4c]
test cl, 1
je 0x41f7c9
push dword [edi + 4]
call fcn.0041e9c0
add esp, 4
cmp ax, 4
jb 0x41fd32
push dword [edi + 4]
mov edx, 4
mov ecx, str._api
call fcn.0041ead0
add esp, 4
jmp 0x41fd32
mov ecx, dword [ebp - 0x44]
add ecx, 4
mov dword [ebp - 0x44], ecx
jmp 0x41fd35
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x3c]
add eax, 4
push 0x1c
mov dword [ebp - 0x50], eax
mov cx, word [eax - 4]
call fcn.004137e0
lea eax, [ebp - 0x3c]
mov byte [ebp - 0x21], 0
add esp, 4
mov dword [ebp - 0x60], eax
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41f800
sub ecx, edx
mov eax, 0x800
movzx edx, cx
cmp dx, ax
cmova edx, eax
mov al, byte [ebp - 0x48]
and al, 1
mov dword [ebp - 0x68], edx
mov byte [ebp - 0x40], al
je 0x41f84b
cmp di, dx
jbe 0x41f83d
mov ecx, dword [ebp - 0x4c]
sub edi, edx
mov dl, byte [ebp - 0x55]
push edi
call fcn.0041f180
mov edx, dword [ebp - 0x68]
add esp, 4
mov word [ebp - 0x20], 0x2326
xor edi, edi
mov byte [ebp - 0x1b], 0x3b
jmp 0x41f85b
cmp di, dx
movzx ecx, di
movzx eax, dx
cmovbe ecx, eax
add word [ebp - 0x44], cx
xor eax, eax
xor esi, esi
cmp ax, dx
jae 0x41f912
mov eax, dword [ebp - 0x60]
mov bh, byte [ebp - 0x40]
mov dword [ebp - 0x64], eax
mov bl, byte [eax]
cmp bl, 0x20
jb 0x41f896
cmp bl, 0x27
je 0x41f896
cmp bl, 0x22
je 0x41f896
cmp bl, 0x3c
je 0x41f896
cmp bl, 0x3e
je 0x41f896
cmp bl, 0x26
je 0x41f896
cmp bl, 0x7f
jb 0x41f901
test bh, bh
je 0x41f8fd
cmp si, di
jbe 0x41f8b7
mov eax, dword [ebp - 0x4c]
mov edx, esi
movzx ecx, di
sub edx, edi
add ecx, dword [ebp - 0x60]
push dword [eax + 4]
call fcn.0041ead0
add esp, 4
xor edx, edx
movzx eax, bl
mov ecx, 0xa
div ecx
add dl, 0x30
movzx eax, al
mov byte [ebp - 0x1c], dl
xor edx, edx
div ecx
add al, 0x30
add dl, 0x30
mov byte [ebp - 0x1e], al
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 0x1d], dl
lea edx, [ecx - 4]
lea ecx, [ebp - 0x20]
push dword [eax + 4]
call fcn.0041ead0
mov edx, dword [ebp - 0x68]
lea eax, [esi + 1]
movzx edi, ax
add esp, 4
mov eax, dword [ebp - 0x64]
jmp 0x41f901
add dword [ebp - 0x44], 5
inc esi
inc eax
mov dword [ebp - 0x64], eax
cmp si, dx
jb 0x41f871
mov ebx, dword [ebp - 0x5c]
cmp byte [ebp - 0x40], 0
je case.0x41f5e5.38
cmp si, di
jbe case.0x41f5e5.38
sub esi, edi
movzx ecx, di
mov edi, dword [ebp - 0x4c]
mov edx, esi
add ecx, dword [ebp - 0x60]
push dword [edi + 4]
call fcn.0041ead0
add esp, 4
jmp 0x41fd32
mov ecx, dword [ebp - 0x50]
add ecx, 4
mov dword [ebp - 0x50], ecx
mov eax, dword [ecx - 4]
mov ebx, dword [eax]
jmp 0x41f95e
mov eax, dword [ebp - 0x50]
add eax, 4
mov dword [ebp - 0x50], eax
mov ebx, dword [eax - 4]
mov dword [ebp - 0x68], ebx
xor edi, edi
xor edx, edx
mov dword [ebp - 0x64], edx
test di, di
je 0x41f97b
add esi, 0xffff
movzx eax, si
mov byte [ebp + eax - 0x20], 0x2e
mov ecx, 3
sub ecx, edx
shl ecx, 3
shr ebx, cl
test bl, bl
jne 0x41f9a0
add esi, 0xffff
movzx eax, si
mov byte [ebp + eax - 0x20], 0x30
jmp 0x41f9d2
movzx ecx, bl
mov eax, 0xcccccccd
mul ecx
add esi, 0xffff
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
movzx eax, si
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [ebp + eax - 0x20], bl
mov bl, dl
test dl, dl
jne 0x41f9a0
mov edx, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x68]
inc edi
inc edx
mov dword [ebp - 0x64], edx
cmp di, 4
jb 0x41f968
jmp 0x41fcb2
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x4c]
add eax, 4
mov dword [ebp - 0x50], eax
mov esi, dword [eax - 4]
movzx edx, byte [esi]
inc esi
mov dword [ebp - 0x64], edx
test dx, dx
je 0x41fd32
mov eax, 0xf1
cmp word [edi + 4], ax
jne 0x41fa20
xor eax, eax
cmp byte [0xd4870f], al
setne al
inc eax
cmp eax, 1
je 0x41fa35
cmp byte [0xd47110], 0
jbe 0x41fa77
mov al, byte [edi + 0x10a]
and al, 0x60
cmp al, 0x60
je 0x41fa77
test cl, 1
je 0x41fa69
push dword [edi + 4]
call fcn.0041e9c0
add esp, 4
cmp ax, 5
jb 0x41fd32
push dword [edi + 4]
mov edx, 5
mov ecx, 0x4f95b8
call fcn.0041ead0
add esp, 4
jmp 0x41fd32
mov ecx, dword [ebp - 0x44]
add ecx, 5
mov dword [ebp - 0x44], ecx
jmp 0x41fd35
test cl, 1
je 0x41fb14
mov bl, byte [0xd4bef8]
xor ecx, ecx
lea edi, [ecx + 0xc]
nop dword [eax + eax]
mov al, bl
lea ecx, [ecx + 1]
sub al, byte [ecx + 0x500b6f]
mov byte [ebp + ecx - 0x21], al
sub edi, 1
jne 0x41fa90
mov edi, dword [ebp - 0x4c]
test dx, dx
je 0x41fb0c
nop dword [eax]
mov ecx, 0xc
movzx eax, dl
cmp dx, cx
cmovb ecx, eax
xor eax, eax
movzx ebx, cl
mov edx, ebx
cmp ax, bx
jae 0x41fae1
lea ecx, [ebp - 0x20]
mov edi, ebx
nop
mov al, byte [esi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
inc esi
sub edi, 1
jne 0x41fad0
mov edi, dword [ebp - 0x4c]
lea eax, [ebp - 0x14]
push 0x10
push eax
lea ecx, [ebp - 0x20]
call fcn.00438f50
push dword [edi + 4]
mov edx, eax
lea ecx, [ebp - 0x14]
call fcn.0041ead0
mov edx, dword [ebp - 0x64]
add esp, 0xc
sub edx, ebx
mov dword [ebp - 0x64], edx
test dx, dx
jne 0x41fab0
mov ebx, dword [ebp - 0x5c]
jmp 0x41fd32
movzx ecx, dx
mov eax, 0xaaaaaaab
add ecx, 2
mul ecx
mov ecx, dword [ebp - 0x44]
shr edx, 1
lea ecx, [ecx + edx*4]
mov dword [ebp - 0x44], ecx
jmp 0x41fd35
mov eax, dword [ebp - 0x50]
add eax, 4
mov edx, eax
mov dword [ebp - 0x50], eax
mov edx, dword [edx - 4]
test edx, edx
jne 0x41fb52
lea esi, [edx + 0x1b]
mov byte [ebp - 5], 0x30
lea edi, [edx + 1]
jmp 0x41fcc1
mov al, dl
add esi, 0xffff
and al, 0xf
mov cl, 9
cmp cl, al
sbb cl, cl
add al, 0x30
and cl, 7
shr edx, 4
add cl, al
movzx eax, si
mov byte [ebp + eax - 0x20], cl
test edx, edx
jne 0x41fb52
jmp 0x41fcb2
mov eax, dword [ebp - 0x50]
add eax, 4
mov dword [ebp - 0x50], eax
movzx edx, word [eax - 4]
mov edi, edx
mov eax, edx
neg eax
test di, di
movzx ecx, ax
mov eax, edx
cmovns ecx, eax
movzx eax, byte [ebp - 0x40]
movzx ebx, cx
mov ecx, dword [ebp - 0x48]
or cl, 2
test di, di
movzx ecx, cl
cmovns ecx, eax
mov dword [ebp - 0x48], ecx
jmp 0x41fc05
mov edi, dword [ebp - 0x50]
add edi, 4
mov dword [ebp - 0x50], edi
movzx ebx, word [edi - 4]
jmp 0x41fc05
mov edi, dword [ebp - 0x50]
movzx eax, byte [ebp - 0x40]
add edi, 4
mov dword [ebp - 0x50], edi
mov edx, dword [edi - 4]
mov ebx, edx
neg ebx
test edx, edx
cmovns ebx, edx
or cl, 2
test edx, edx
movzx ecx, cl
cmovns ecx, eax
mov dword [ebp - 0x48], ecx
jmp 0x41fbf9
mov eax, dword [ebp - 0x50]
add eax, 4
mov dword [ebp - 0x50], eax
mov ebx, dword [eax - 4]
mov eax, ebx
shr eax, 0x10
test eax, eax
jne 0x41fc55
movzx ebx, bx
test bx, bx
jne 0x41fc20
mov esi, 0x1b
mov byte [ebp - 5], 0x30
jmp 0x41fc9f
movzx ecx, bx
mov eax, 0xcccccccd
mul ecx
add esi, 0xffff
shr edx, 3
movzx edx, dx
mov al, dl
shl al, 2
lea ecx, [eax + edx]
movzx eax, si
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [ebp + eax - 0x20], bl
mov ebx, edx
test dx, dx
jne 0x41fc20
jmp 0x41fc9c
test ebx, ebx
jne 0x41fc70
lea esi, [ebx + 0x1b]
mov byte [ebp - 5], 0x30
lea edi, [ebx + 1]
jmp 0x41fcc1
mov eax, 0xcccccccd
add esi, 0xffff
mul ebx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
movzx eax, si
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [ebp + eax - 0x20], bl
mov ebx, edx
test edx, edx
jne 0x41fc70
mov ecx, dword [ebp - 0x48]
test cl, 2
je 0x41fcb2
add esi, 0xffff
movzx eax, si
mov byte [ebp + eax - 0x20], 0x2d
mov eax, 0x1c
sub eax, esi
movzx edi, ax
test si, si
je 0x41fce1
mov edx, dword [ebp - 0x60]
mov cl, byte [ebp - 0x55]
cmp dx, di
jbe 0x41fce7
add esi, 0xffff
inc edi
movzx eax, si
mov byte [ebp + eax - 0x20], cl
test si, si
jne 0x41fcc7
jmp 0x41fce7
mov edx, dword [ebp - 0x60]
mov cl, byte [ebp - 0x55]
test byte [ebp - 0x48], 1
je 0x41fd1c
cmp dx, di
jbe 0x41fd02
sub edx, edi
push edx
mov dl, cl
mov ecx, dword [ebp - 0x4c]
call fcn.0041f180
add esp, 4
movzx eax, si
lea ecx, [ebp - 0x20]
add ecx, eax
mov edx, edi
mov eax, dword [ebp - 0x4c]
push dword [eax + 4]
call fcn.0041ead0
add esp, 4
jmp 0x41fd2c
cmp dx, di
movzx ecx, dx
movzx eax, di
cmovbe ecx, eax
add word [ebp - 0x44], cx
mov ebx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x54]
inc ebx
movzx eax, bx
mov al, byte [eax + esi]
test al, al
jne 0x41f502
jmp 0x41fd4f
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x48]
test dl, 1
jne 0x41fd7d
push dword [edi + 4]
call fcn.0041e9c0
mov cx, word [ebp - 0x44]
add esp, 4
cmp ax, cx
jb 0x41fdee
mov edx, dword [ebp - 0x48]
movzx ebx, cx
mov dword [ebp - 0x74], ebx
jmp 0x41fd9f
mov eax, dword [ebp - 0x70]
cmp bx, ax
jbe 0x41fd9c
push dword [edi + 4]
sub ebx, eax
movzx ecx, ax
add ecx, esi
mov edx, ebx
call fcn.0041ead0
mov edx, dword [ebp - 0x48]
add esp, 4
mov ebx, dword [ebp - 0x74]
cmp word [ebp - 0x6a], 0
je 0x41fdd1
push dword [edi + 4]
mov byte [ebp - 0x40], 0x22
call fcn.0041e9c0
add esp, 4
cmp ax, 1
jb 0x41fdce
push dword [edi + 4]
mov edx, 1
lea ecx, [ebp - 0x40]
call fcn.0041ead0
add esp, 4
mov edx, dword [ebp - 0x48]
mov al, dl
not al
xor al, dl
and al, 1
xor dl, al
mov dword [ebp - 0x48], edx
test dl, 1
je 0x41fe02
mov ecx, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x78]
jmp 0x41f4f0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004423fe
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov ax, bx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004423fe
mov esp, ebp
pop ebp
ret