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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
lea edi, [esi + 0x22c]
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
shl eax, cl
test dword [ebp + 0x14], eax
je 0x102fa06
push 0
push 0
push ecx
push dword [ebp + 0xc]
call sub.IMM32.dll_ImmGetCandidateListW
mov ebx, eax
test ebx, ebx
je 0x102fa23
cmp dword [edi + 0x88], ebx
je 0x102f6d9
mov eax, dword [edi]
test eax, eax
je 0x102f6de
push eax
call fcn.01029efb
and dword [edi + 0x88], 0
and dword [edi], 0
pop ecx
cmp dword [edi], 0
jne 0x102f6f5
push ebx
call fcn.01029f08
pop ecx
mov dword [edi], eax
test eax, eax
je 0x102fa23
mov dword [edi + 0x88], ebx
mov edi, dword [edi]
push ebx
push edi
push dword [ebp - 4]
push dword [ebp + 0xc]
call sub.IMM32.dll_ImmGetCandidateListW
mov ecx, dword [edi + 8]
cmp ecx, 1
jbe 0x102f736
mov edx, dword [edi + 0xc]
cmp edx, ebx
jae 0x102fa19
mov eax, dword [edi + 0x10]
cmp eax, ebx
jae 0x102fa19
cmp dword [edi + edx*4 + 0x18], ebx
jae 0x102fa19
cmp dword [edi + eax*4 + 0x18], ebx
jae 0x102fa19
mov edx, dword [esi + 8]
mov eax, 0x80
mov dword [ebp + 0x10], edx
cmp edx, eax
jbe 0x102f748
mov dword [ebp + 0x10], eax
push 0xc
pop eax
cmp dword [ebp + 0x10], eax
jae 0x102f753
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
push 5
add eax, 0xfffffff9
xor edx, edx
pop ebx
div ebx
mov ebx, eax
cmp ebx, 9
jbe 0x102f76a
push 9
pop ebx
xor edx, edx
mov eax, ecx
div ebx
push 0x64
pop edx
add eax, 0xa
mov dword [ebp - 8], eax
cmp eax, edx
ja 0x102f780
mov dword [ebp - 8], edx
cmp dword [edi + 4], 2
jne 0x102f798
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x18], 7
xor ebx, ebx
jmp 0x102f7b5
xor eax, eax
xor ebx, ebx
inc eax
xor edx, edx
mov dword [ebp - 0x14], ebx
cmp ecx, eax
jb 0x102f7ae
imul eax, eax, 0xa
inc edx
cmp eax, ecx
jbe 0x102f7a6
lea eax, [edx + edx + 1]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push 4
pop ecx
mul ecx
push edx
push eax
mov dword [ebp - 0xc], ebx
call fcn.01004f42
test eax, eax
jl 0x102fa27
mov eax, dword [ebp - 0xc]
cmp dword [esi + 0x340], eax
je 0x102f7fd
lea ebx, [esi + 0x33c]
mov eax, dword [ebx]
test eax, eax
je 0x102f7fb
push eax
call fcn.01029efb
and dword [ebx], 0
and dword [esi + 0x340], 0
pop ecx
xor ebx, ebx
cmp dword [esi + 0x33c], ebx
jne 0x102f834
mov eax, dword [ebp - 8]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01029f08
pop ecx
mov dword [esi + 0x33c], eax
cmp eax, ebx
je 0x102fa23
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x340], eax
cmp dword [ebp - 0x14], ebx
je 0x102f885
mov eax, dword [esi + 0x33c]
xor ecx, ecx
inc ecx
mov dword [eax], ebx
cmp dword [ebp + 0x18], ebx
je 0x102f859
mov eax, dword [edi + 0xc]
push 9
xor edx, edx
pop ebx
div ebx
mov dword [esi + 0x334], edx
mov ebx, dword [esi + 0x334]
jmp 0x102f86e
mov eax, dword [esi + 0x33c]
mov dword [eax + ecx*4], ebx
inc ecx
add ebx, 9
cmp ebx, dword [edi + 8]
jb 0x102f861
mov eax, dword [edi + 8]
cmp ebx, eax
jbe 0x102f921
mov ebx, eax
jmp 0x102f921
cmp dword [ebp + 0x18], ebx
je 0x102f890
mov dword [esi + 0x334], ebx
mov eax, dword [esi + 0x33c]
mov ecx, dword [esi + 0x334]
mov dword [eax], ecx
mov eax, dword [edi + 0x18]
xor ebx, ebx
add eax, edi
inc ebx
push eax
mov dword [ebp - 8], ebx
call fcn.0102e64e
add eax, 3
mov dword [ebp - 0xc], eax
cmp dword [edi + 8], ebx
jbe 0x102f91e
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
lea eax, [edi + 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
add eax, edi
push eax
call fcn.0102e64e
mov ecx, dword [ebp - 0xc]
lea ecx, [eax + ecx + 3]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], ecx
cmp ecx, dword [ebp - 0x20]
ja 0x102f8ff
mov eax, dword [esi + 0x33c]
mov edx, dword [ebp - 8]
mov ecx, ebx
sub ecx, dword [eax + edx*4 - 4]
cmp ecx, 9
jb 0x102f914
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov ecx, dword [esi + 0x33c]
add eax, 3
mov dword [ecx + edx*4], ebx
mov dword [ebp - 0xc], eax
add dword [ebp - 0x10], 4
inc ebx
cmp ebx, dword [edi + 8]
jb 0x102f8c9
mov ecx, dword [ebp - 8]
mov eax, dword [esi + 0x33c]
mov dword [eax + ecx*4], ebx
mov ebx, dword [ebp + 0x10]
imul ebx, ebx, 3
add ebx, 4
mov dword [esi + 0x338], ecx
cmp dword [esi + 0x2b0], ebx
jae 0x102f97b
mov eax, dword [esi + 0x2ac]
test eax, eax
je 0x102f960
push eax
call fcn.01029efb
and dword [esi + 0x2ac], 0
and dword [esi + 0x2b0], 0
pop ecx
push ebx
call fcn.01029f08
pop ecx
mov dword [esi + 0x2ac], eax
test eax, eax
je 0x102fa23
mov dword [esi + 0x2b0], ebx
push dword [ebp - 0x14]
mov eax, dword [esi + 0x2ac]
mov ecx, dword [ebp + 0x10]
push esi
push dword [ebp - 0x18]
lea edx, [ecx + ecx + 4]
mov dword [eax], edx
push ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], 0x4b425935
mov dword [ebp - 0x2c], ebx
mov ecx, dword [eax]
add ecx, eax
push ecx
add eax, 4
push eax
push edi
call fcn.0102e97e
cmp eax, 0xffffffff
je 0x102fa23
mov edi, eax
mov eax, dword [esi + 0x33c]
mov dword [esi + 0x344], 1
shl edi, 2
push dword [edi + eax]
push dword [ebp - 4]
push 0x16
push dword [ebp + 0xc]
call sub.IMM32.dll_ImmNotifyIME
mov eax, dword [esi + 0x33c]
add eax, edi
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
push ecx
push dword [ebp - 4]
push 0x17
push dword [ebp + 0xc]
call sub.IMM32.dll_ImmNotifyIME
and dword [esi + 0x344], 0
lea eax, [ebp - 0x30]
push eax
call fcn.01027af1
mov edi, dword [ebp - 0x1c]
inc dword [ebp - 4]
add edi, 4
cmp dword [ebp - 4], 0x20
mov dword [ebp - 0x1c], edi
jb 0x102f692
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x14
xor eax, eax
jmp 0x102fa1c
lea edi, [esi + 0x33c]
mov eax, dword [edi]
cmp eax, ebx
je 0x102fa23
push eax
call fcn.01029efb
pop ecx
mov dword [edi], ebx
mov dword [esi + 0x340], ebx
jmp 0x102fa23