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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, dword [ebp + 8]
movzx eax, byte [esi + 1]
push edi
xor edi, edi
inc edi
cmp eax, 0x5d
jg 0x43a162
je 0x43a0cb
cmp eax, 0x40
jg 0x439f8a
je 0x439f82
sub eax, 0x21
je 0x439f73
push 2
pop ecx
sub eax, ecx
je 0x439f67
dec eax
je 0x439f46
dec eax
je 0x439a91
sub eax, 0xa
je 0x439a42
sub eax, 0xb
jne 0x43a455
xor dword [ebx + 0x2c], 0x1000
xor dword [0x582858], 4
mov edi, ecx
jmp 0x43a455
movzx eax, byte [esi + 3]
movzx ecx, byte [esi + 4]
sub ax, 0x30
imul ax, ax, 0xa
add ax, cx
sub ax, 0x30
mov word [ebx + 0x38], ax
mov cl, byte [esi + 2]
cmp cl, 0x31
jne 0x439a70
or eax, 0x1000
mov word [ebx + 0x38], ax
jmp 0x439a8a
movzx ecx, cl
sub cx, 0x30
imul cx, cx, 0x64
add cx, ax
mov eax, 0xfff
and cx, ax
mov word [ebx + 0x38], cx
push 5
jmp 0x439f84
test dword [ebx + 0x2c], 0x100
jne 0x43a455
mov eax, dword [str.frstname2]
and dword [ebp - 4], 0
test eax, eax
je 0x439acc
add esi, 2
push eax
push esi
call fcn.00401041
pop ecx
pop ecx
test eax, eax
jne 0x439acc
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
mov eax, dword [eax*8 + 0x507f84]
test eax, eax
jne 0x439aae
mov eax, dword [ebp - 4]
mov ecx, 0x9b
mov esi, ebx
mov edi, 0x582490
rep movsd dword es:[edi], dword [esi]
mov esi, 0x582700
mov dword [ebx + 0x20], esi
mov dword [0x5826fc], eax
mov ecx, 0x100
or dword [ebx + 0x2c], ecx
mov eax, dword [eax*8 + 0x507f80]
cmp eax, 0x4b
jg 0x439cf2
cmp eax, 0x40
jge 0x439cd1
cmp eax, 0x15
jg 0x439bed
je 0x439be6
dec eax
cmp eax, 0x13
ja case.0x439b24.3
jmp dword [eax*4 + 0x43a45d]
push 0x5553ec
push esi
call fcn.00493d10
pop ecx
jmp 0x439f3e
push 0x555424
jmp 0x439b30
movzx eax, word [0x5553e8]
add eax, 0xa
push eax
push 0x4dc9c8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp case.0x439b24.3
movzx eax, byte [0x5553ea]
and eax, 3
push dword [eax*4 + 0x507f58]
push str.Type__s
jmp 0x439b53
movzx eax, word [0x555498]
jmp 0x439c16
movzx eax, word [0x55549a]
jmp 0x439c16
mov eax, dword [0x5554a8]
push 0x64
cdq
pop ecx
idiv ecx
push eax
push 0x4dc9b8
jmp 0x439b53
mov eax, dword [0x5554ac]
jmp 0x439b97
mov eax, dword [0x5554b0]
jmp 0x439b97
mov eax, dword [0x5554b4]
jmp 0x439b97
mov eax, dword [0x5554b8]
jmp 0x439b97
mov eax, dword [0x5554bc]
push 0xa
jmp 0x439b99
mov eax, dword [0x5554c0]
jmp 0x439bc6
mov eax, dword [0x5554c4]
jmp 0x439bc6
mov eax, dword [0x5554c8]
jmp 0x439bc6
mov eax, dword [0x5554cc]
jmp 0x439bc6
mov eax, dword [0x5554d0]
jmp 0x439bc6
cmp eax, 0x1d
jg 0x439c58
je 0x439c4f
sub eax, 0x16
je 0x439c45
dec eax
je 0x439c3e
dec eax
je 0x439c37
dec eax
je 0x439c30
dec eax
je 0x439c29
dec eax
je 0x439c22
dec eax
jne case.0x439b24.3
movzx eax, word [0x5554a0]
inc eax
push eax
push 0x4da1ec
jmp 0x439b53
mov eax, dword [0x5554e8]
jmp 0x439bc6
mov eax, dword [0x5554e4]
jmp 0x439bc6
mov eax, dword [0x5554e0]
jmp 0x439bc6
mov eax, dword [0x5554dc]
jmp 0x439bc6
mov eax, dword [0x5554d8]
jmp 0x439bc6
mov eax, dword [0x5554d4]
jmp 0x439bc6
movzx eax, word [0x5554a2]
jmp 0x439c16
sub eax, 0x1e
je 0x439cb9
dec eax
dec eax
je 0x439caf
sub eax, 0xc
je 0x439ca4
sub eax, 7
je 0x439c99
dec eax
je 0x439c8e
dec eax
je 0x439c83
dec eax
jne case.0x439b24.3
push dword [0x5471b4]
jmp 0x439b4e
push dword [0x5471b0]
jmp 0x439b4e
push dword [0x5471ac]
jmp 0x439b4e
push dword [0x554d50]
jmp 0x439b4e
push dword [0x554d4c]
jmp 0x439b4e
mov eax, dword [0x5554ec]
jmp 0x439bc6
movzx eax, byte [0x55549e]
push dword [eax*4 + 0x507f68]
push 0x4db6cc
jmp 0x439b53
push eax
call fcn.004010d2
push 0xa
pop ecx
cdq
idiv ecx
push eax
push 0x4dc9b8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp case.0x439b24.3
mov edx, 0x217
cmp eax, edx
jg 0x439e45
je 0x439e41
add edx, 0xfffffff9
cmp eax, edx
jg 0x439e0f
je 0x439dfd
cmp eax, 0x4c
je 0x439df3
cmp eax, 0x4d
je 0x439de9
cmp eax, 0x80
je 0x439ddf
cmp eax, 0x87
jle case.0x439b24.3
cmp eax, 0x8b
jle 0x439dac
cmp eax, ecx
je 0x439d81
cmp eax, 0x20a
jne case.0x439b24.3
mov eax, dword [0x5554ac]
add eax, 0xfffff830
imul eax, eax, 0x64
push 0x37
cdq
pop ecx
idiv ecx
test eax, eax
jns 0x439d6d
xor eax, eax
mov ecx, 0x270f
cmp eax, ecx
jle 0x439f38
mov eax, ecx
jmp 0x439f38
mov eax, dword [ebp + 8]
add eax, 3
push 2
push eax
call fcn.00401672
movsx eax, word [eax*2 + 0x551288]
push eax
push 0x4dc9c8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp case.0x439b24.3
mov eax, dword [0x5471b4]
test eax, eax
jns 0x439db7
neg eax
push eax
push str.__4d
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp dword [0x5471b4], 0
setl al
lea eax, [eax + eax + 0x2b]
mov byte [0x582700], al
jmp case.0x439b24.3
push 0x55545c
jmp 0x439b30
push 0x5553b0
jmp 0x439b30
push 0x555378
jmp 0x439b30
push 0x40
call fcn.004010d2
push eax
call fcn.00438c77
jmp 0x439b36
sub eax, 0x211
je 0x439e3d
dec eax
je 0x439e39
dec eax
je 0x439e35
dec eax
je 0x439e31
dec eax
je 0x439e2d
dec eax
jne case.0x439b24.3
push 0x46
jmp 0x439dff
push 0x45
jmp 0x439dff
push 0x44
jmp 0x439dff
push 0x43
jmp 0x439dff
push 0x42
jmp 0x439dff
push 0x41
jmp 0x439dff
push 0x47
jmp 0x439dff
mov ecx, 0x30e
cmp eax, ecx
jg 0x439ecb
je 0x439eba
cmp eax, 0x218
je 0x439eb3
cmp eax, 0x219
je 0x439eac
cmp eax, 0x21a
je 0x439ea5
cmp eax, 0x21b
je 0x439e9e
cmp eax, 0x220
je 0x439e8f
lea ecx, [eax - 0x300]
cmp ecx, 0xd
ja case.0x439b24.3
movsx eax, word [eax*2 + 0x550c88]
jmp 0x439f38
push 0x20
call fcn.004010d2
imul eax, eax, 0x64
jmp 0x439e04
push 0x4b
jmp 0x439dff
push 0x4a
jmp 0x439dff
push 0x49
jmp 0x439dff
push 0x48
jmp 0x439dff
movsx eax, word [0x5512a4]
sub eax, 0x7d0
jmp 0x439d5e
cmp eax, 0x30f
je 0x439f2d
cmp eax, 0x37f
jle case.0x439b24.3
cmp eax, 0x38d
jle 0x439f20
cmp eax, 0x38e
je 0x439f13
cmp eax, 0x38f
je 0x439f06
lea ecx, [eax - 0x390]
cmp ecx, 0xf
ja case.0x439b24.3
movsx eax, word [eax*2 + 0x550f68]
jmp 0x439b9d
movsx eax, word [eax*2 + 0x550b88]
jmp 0x439b9d
movsx eax, word [eax*2 + 0x550b88]
jmp 0x439b97
movsx eax, word [eax*2 + 0x550b88]
jmp 0x439bc6
movsx eax, word [eax*2 + 0x550c88]
imul eax, eax, 0x64
push eax
call fcn.00438c77
pop ecx
xor edi, edi
jmp 0x43a455
and dword [ebx + 0x244], 0
and dword [ebx + 0x240], 0
and dword [ebx + 0x2c], 0xffffff5f
mov edi, ecx
call fcn.004018b6
jmp 0x43a455
xor dword [ebx + 0x2c], 0x200
jmp 0x439a3b
mov ax, word [ebx + 6]
push 0x54
mov word [ebx + 0x12], ax
pop eax
mov word [ebx + 0x16], ax
push 2
pop edi
jmp 0x43a455
sub eax, 0x47
je 0x43a07f
sub eax, 5
je 0x43a070
dec eax
dec eax
je 0x43a043
sub eax, 5
je 0x439ffc
sub eax, 8
jne 0x43a455
mov eax, dword [ebx + 0x240]
mov cx, word [ebx + 0x18]
mov word [ebx + eax*8 + 0x44], cx
mov ax, word [ebx + 0x240]
imul ax, word [0x552ef4]
add ax, word [ebx + 0x1a]
mov ecx, dword [ebx + 0x240]
mov word [ebx + ecx*8 + 0x46], ax
mov al, byte [esi + 2]
sub al, 0x30
mov cl, 0xa
imul cl
add al, byte [esi + 3]
mov ecx, dword [ebx + 0x240]
sub al, 0x30
mov byte [ebx + ecx*8 + 0x40], al
jmp 0x43a28e
movzx eax, byte [esi + 2]
movzx ecx, byte [esi + 3]
imul eax, eax, 0xa
lea edx, [eax + ecx - 0x210]
xor eax, eax
mov dword [ebx + 0x244], eax
cmp dword [ebx + 0x240], eax
jle 0x43a28e
lea ecx, [ebx + 0x40]
movzx esi, byte [ecx]
cmp esi, edx
jne 0x43a032
mov dword [ebx + 0x244], eax
inc eax
add ecx, 8
cmp eax, dword [ebx + 0x240]
jl 0x43a025
jmp 0x43a28e
movzx esi, byte [esi + 2]
sub esi, 0x30
xor eax, eax
cmp esi, 9
setg al
xor ecx, ecx
test esi, esi
sets cl
or eax, ecx
je 0x43a060
push 8
pop esi
push esi
mov eax, ebx
call fcn.00438713
pop ecx
push 3
jmp 0x439f84
xor dword [ebx + 0x2c], 0x8000
push 2
pop edi
jmp 0x43a455
movzx eax, byte [esi + 2]
sub ax, 0x30
mov word [ebx + 0x24c], ax
movzx eax, byte [esi + 3]
sub ax, 0x30
mov word [ebx + 0x250], ax
movzx eax, byte [esi + 4]
sub ax, 0x30
mov word [ebx + 0x24e], ax
movzx eax, byte [esi + 5]
push 6
pop edi
push dword [ebp + 0xc]
sub ax, 0x30
mov word [ebx + 0x252], ax
call fcn.00402185
jmp 0x43a268
push 2
pop edi
call fcn.004010c3
mov ecx, dword [ebx + 0x240]
mov dx, word [ebx + 0x18]
lea ecx, [ebx + ecx*8]
sub dx, word [ecx + 0x44]
add dx, 0x14
mov word [ecx + 0x42], dx
mov ecx, dword [ebx + 0x240]
mov byte [ebx + ecx*8 + 0x41], al
mov dx, word [ebx + 4]
mov ecx, dword [ebx + 0x240]
add dx, dx
add dx, word [ebx + 0x1c]
lea ecx, [ebx + ecx*8 + 0x44]
add word [ecx], dx
mov ecx, dword [ebx + 0x240]
test ecx, ecx
jne 0x43a12c
mov ax, word [ebx + 6]
add ax, ax
add ax, word [ebx + 0x1e]
sub ax, di
add word [ebx + 0x46], ax
jmp 0x43a142
mov dx, word [ebx + 6]
add dx, dx
add dx, word [ebx + 0x1a]
add dx, ax
sub dx, di
mov word [ebx + ecx*8 + 0x46], dx
inc dword [ebx + 0x240]
push 0x3f
pop ecx
cmp dword [ebx + 0x240], ecx
jbe 0x43a455
mov dword [ebx + 0x240], ecx
jmp 0x43a455
cmp eax, 0x66
jg 0x43a2da
je 0x43a295
sub eax, 0x5f
je 0x43a277
dec eax
dec eax
je 0x43a26e
dec eax
je 0x43a229
dec eax
je 0x43a1e6
dec eax
jne 0x43a455
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00401cc1
pop ecx
pop ecx
lea edx, [esi + 2]
lea ecx, [ebp + 8]
call fcn.00438ba8
mov edi, eax
mov eax, dword [ebp + 8]
imul eax, dword [ebp - 8]
add eax, eax
cdq
and edx, 0xf
add eax, edx
sar eax, 4
add edi, 3
lea edx, [edi + esi]
mov word [ebx + 0x18], ax
call fcn.00438ba8
add edi, eax
mov eax, dword [ebp + 8]
imul eax, dword [ebp - 4]
add eax, eax
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
jmp 0x43a220
xor eax, eax
mov word [ebp - 0x10], ax
mov word [ebp - 0xe], ax
mov ax, word [ebx + 8]
add ax, ax
mov word [ebp - 0xc], ax
mov ax, word [ebx + 0xa]
add ax, ax
push 2
mov word [ebp - 0xa], ax
pop edi
lea eax, [ebp - 0x10]
push eax
push dword [0x58285c]
call fcn.00401050
pop ecx
xor eax, eax
pop ecx
mov word [ebx + 0x18], ax
mov word [ebx + 0x1a], ax
jmp 0x43a455
mov al, byte [esi + 2]
cmp al, 0x30
jb 0x43a23d
cmp al, 0x39
ja 0x43a23d
movzx eax, al
sub ax, 0x30
jmp 0x43a255
cmp al, 0x41
jb 0x43a24e
cmp al, 0x46
ja 0x43a24e
movzx eax, al
sub ax, 0x37
jmp 0x43a255
movzx eax, al
sub ax, 0x57
push 3
mov word [ebx + 0x26], ax
movzx eax, ax
pop edi
push eax
push 0
call fcn.00401744
pop ecx
pop ecx
jmp 0x43a455
xor dword [ebx + 0x2c], 0x10
jmp 0x439f82
mov al, byte [esi + 2]
sub al, 0x30
mov byte [ebx + 0x3c], al
movzx eax, byte [esi + 3]
sub ax, 0x30
add ax, ax
mov word [ebx + 0x3e], ax
push 4
jmp 0x439f84
mov al, byte [esi + 2]
cmp al, 0x30
jb 0x43a2a9
cmp al, 0x39
ja 0x43a2a9
movzx eax, al
sub ax, 0x30
jmp 0x43a2c1
cmp al, 0x41
jb 0x43a2ba
cmp al, 0x46
ja 0x43a2ba
movzx eax, al
sub ax, 0x37
jmp 0x43a2c1
movzx eax, al
sub ax, 0x57
mov word [ebx + 0x24], ax
xor eax, eax
push 3
mov word [ebx + 0x24a], ax
movzx eax, word [ebx + 0x24]
pop edi
push eax
push 1
jmp 0x43a262
sub eax, 0x68
je 0x43a41a
sub eax, 3
je 0x43a40e
sub eax, 3
je 0x43a402
sub eax, 4
je 0x43a3d3
dec eax
jne 0x43a455
or dword [ebx + 0x2c], 0x400
mov eax, dword [ebx + 0x2c]
test al, 0x20
jne 0x43a3a3
push 1
call fcn.004014c9
mov eax, dword [ebx + 0x2c]
and eax, 0xffffff7f
or eax, 0x20
pop ecx
mov dword [ebx + 0x2c], eax
mov cl, byte [esi + 2]
cmp cl, 0x3f
je 0x43a377
movzx edx, byte [esi + 3]
and dword [ebx + 0x244], 0
movzx ecx, cl
imul ecx, ecx, 0xa
lea ecx, [ecx + edx - 0x210]
mov dword [ebp + 8], ecx
xor ecx, ecx
cmp dword [ebx + 0x240], ecx
jle 0x43a377
lea edx, [ebx + 0x40]
movzx edi, byte [edx]
cmp edi, dword [ebp + 8]
jne 0x43a36b
mov dword [ebx + 0x244], ecx
inc ecx
add edx, 8
cmp ecx, dword [ebx + 0x240]
jl 0x43a35d
mov cl, byte [esi + 4]
cmp cl, 0x78
je 0x43a384
cmp cl, 0x59
jne 0x43a38a
or eax, 0x40
mov dword [ebx + 0x2c], eax
mov al, byte [esi + 4]
cmp al, 0x79
je 0x43a399
cmp al, 0x59
je 0x43a399
push 1
jmp 0x43a39b
push 0
push ebx
call fcn.00438773
pop ecx
pop ecx
push ebx
call fcn.00401654
pop ecx
test ax, ax
js case.0x439b24.3
push 0
call fcn.004014c9
pop ecx
call fcn.004019fb
mov eax, dword [ebx + 0x2c]
and eax, 0xffffff9b
or eax, 0x80
mov dword [ebx + 0x2c], eax
jmp 0x43a28e
movzx eax, word [ebx + 0x24]
mov cx, word [ebx + 0x26]
push 2
mov word [ebx + 0x26], ax
movzx eax, ax
pop edi
push eax
push 0
mov word [ebx + 0x24], cx
call fcn.00401744
movzx eax, word [ebx + 0x24]
push eax
push 1
call fcn.00401744
add esp, 0x10
jmp 0x43a455
xor dword [ebx + 0x2c], 0x2000
push 2
pop edi
jmp 0x43a455
xor dword [ebx + 0x2c], 0x10000
jmp 0x439f82
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00401cc1
pop ecx
pop ecx
lea edx, [esi + 2]
lea ecx, [ebp + 8]
call fcn.00438ba8
mov edi, eax
mov eax, dword [ebp + 8]
add eax, eax
add edi, 3
lea edx, [edi + esi]
mov word [ebx + 0x1c], ax
call fcn.00438ba8
add edi, eax
mov eax, dword [ebp + 8]
add eax, eax
mov word [ebx + 0x1e], ax
mov eax, edi
pop edi
pop esi
leave
ret