Function at 0x40fad0
Capabilities:
Resolve function by parsing pe exports
Validate payment card number using luhn algorithm

Disassembly:
push 0xffffffffffffffff
push 0x459fd5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x16c
mov eax, dword [esp + 0x180]
push ebx
push ebp
push esi
push edi
xor esi, esi
push 0xffffffffffffffff
push esi
mov dword [esp + 0x44], ecx
mov edi, 0xf
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x70], esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], esi
mov byte [esp + 0x24], 0
call fcn.00401710
mov dword [esp + 0x184], esi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], esi
mov byte [esp + 0x48], 0
push esi
push 0x45d77d
lea ecx, [esp + 0x114]
mov byte [esp + 0x18c], 1
mov dword [esp + 0x12c], edi
mov dword [esp + 0x128], esi
mov byte [esp + 0x118], 0
call fcn.00401800
mov ecx, dword [esp + 0x198]
push esi
push 0x45d77d
mov byte [esp + 0x18c], 2
call fcn.00401800
push 1
push esi
lea ecx, [esp + 0x18]
push ecx
mov bl, 0x2c
lea ecx, [esp + 0x20]
mov byte [esp + 0x1c], bl
call fcn.0040c9f0
mov esi, eax
cmp esi, 0xffffffff
mov ebp, 0x10
je 0x40fc3b
mov eax, dword [esp + 0x28]
cmp eax, esi
mov edi, 1
jae 0x40fbbe
lea ecx, [esp + 0x14]
call fcn.0043e491
mov eax, dword [esp + 0x28]
mov ecx, eax
sub ecx, esi
cmp ecx, 1
jae 0x40fbcd
mov edi, ecx
test edi, edi
jbe 0x40fc1b
mov ebp, dword [esp + 0x2c]
cmp ebp, 0x10
mov ecx, dword [esp + 0x18]
mov edx, ecx
jae 0x40fbe2
lea edx, [esp + 0x18]
mov ecx, edx
sub eax, edi
sub eax, esi
add edx, edi
push eax
add edx, esi
push edx
add ecx, esi
push ecx
call fcn.00430ec0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
sub eax, edi
add esp, 0xc
cmp ecx, 0x10
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
jae 0x40fc12
lea ecx, [esp + 0x18]
mov byte [ecx + eax], 0
mov ebp, 0x10
push 1
push esi
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x20]
mov byte [esp + 0x1c], bl
call fcn.0040c9f0
mov esi, eax
cmp esi, 0xffffffff
jne 0x40fba4
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x18]
xor ebx, ebx
cmp ecx, ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x60], ebx
mov eax, esi
jae 0x40fc63
lea eax, [esp + 0x18]
movsx eax, byte [eax]
sub eax, 0x30
cmp ecx, ebp
mov dword [esp + 0xa8], eax
mov edx, esi
jae 0x40fc7a
lea edx, [esp + 0x18]
mov eax, dword [esp + 0x28]
movsx edx, byte [eax + edx - 1]
sub edx, 0x30
cmp ecx, ebp
mov dword [esp + 0xb0], edx
mov edx, esi
jae 0x40fc97
lea edx, [esp + 0x18]
movsx edx, byte [eax + edx - 2]
sub edx, 0x30
cmp ecx, ebp
mov dword [esp + 0xb4], edx
mov ecx, esi
jae 0x40fcb0
lea ecx, [esp + 0x18]
movsx ecx, byte [eax + ecx - 3]
add eax, 0xfffffffc
push eax
sub ecx, 0x30
push 1
lea eax, [esp + 0x70]
mov dword [esp + 0x6c], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00401980
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x190], 3
call fcn.00401710
cmp dword [esp + 0x80], ebp
mov byte [esp + 0x184], 2
jb 0x40fd03
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x18]
jae 0x40fd11
lea eax, [esp + 0x18]
movsx eax, byte [eax + 0xe]
push 1
sub eax, 0x30
push 0xe
lea ecx, [esp + 0x1c]
mov dword [esp + 0xa8], eax
call fcn.00401240
cmp dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x18]
jae 0x40fd3a
lea eax, [esp + 0x18]
movsx eax, byte [eax + 9]
push 1
sub eax, 0x30
push 9
lea ecx, [esp + 0x1c]
mov dword [esp + 0xb4], eax
call fcn.00401240
cmp dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x18]
jae 0x40fd63
lea eax, [esp + 0x18]
movsx eax, byte [eax + 4]
push 1
sub eax, 0x30
push 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0xac], eax
call fcn.00401240
cmp dword [esp + 0x2c], ebp
mov esi, dword [esp + 0x18]
jae 0x40fd8c
lea esi, [esp + 0x18]
mov edi, dword [esp + 0x28]
test edi, edi
jle 0x40fe15
mov ecx, 1
lea ecx, [ecx]
movsx eax, byte [esi + ecx - 1]
lea edx, [ecx - 1]
sub eax, 0x30
cmp edx, 5
jge 0x40fdb9
mov edx, ecx
imul edx, eax
add ebx, edx
jmp 0x40fdf2
cmp edx, 0xa
jge 0x40fdcf
mov ebp, dword [esp + 0x34]
mov edx, ecx
imul edx, eax
add ebp, edx
mov dword [esp + 0x34], ebp
jmp 0x40fdf2
cmp edx, 0xf
mov edx, ecx
jge 0x40fde5
mov ebp, dword [esp + 0x38]
imul edx, eax
add ebp, edx
mov dword [esp + 0x38], ebp
jmp 0x40fdf2
mov ebp, dword [esp + 0x60]
imul edx, eax
add ebp, edx
mov dword [esp + 0x60], ebp
mov edx, ecx
and edx, reloc.ODBC32.dll_SQLAllocConnect
jns 0x40fe01
dec edx
or edx, 0xfffffffe
inc edx
jne 0x40fe09
add dword [esp + 0x40], eax
jmp 0x40fe0d
add dword [esp + 0x30], eax
inc ecx
lea eax, [ecx - 1]
cmp eax, edi
jl 0x40fda0
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x40]
lea ebp, [edi + edi*2]
sub ebp, esi
xor ecx, ecx
cmp ebx, 9
mov eax, ebx
jle 0x40fe3f
jmp 0x40fe30
cdq
mov esi, 0xa
idiv esi
add ecx, edx
cmp eax, 9
jg 0x40fe30
mov esi, dword [esp + 0x3c]
add ecx, eax
cmp ecx, 9
jle 0x40fe58
push ecx
mov ecx, esi
call fcn.0040f740
mov dword [esp + 0x30], eax
jmp 0x40fe5c
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x34]
xor ecx, ecx
cmp eax, 9
jle 0x40fe76
cdq
mov ebx, 0xa
idiv ebx
add ecx, edx
cmp eax, 9
jg 0x40fe67
add ecx, eax
cmp ecx, 9
jle 0x40fe8b
push ecx
mov ecx, esi
call fcn.0040f740
mov dword [esp + 0x34], eax
jmp 0x40fe8f
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x38]
xor ecx, ecx
cmp eax, 9
jle 0x40feaf
lea ebx, [ebx]
cdq
mov ebx, 0xa
idiv ebx
add ecx, edx
cmp eax, 9
jg 0x40fea0
add ecx, eax
cmp ecx, 9
jle 0x40fec4
push ecx
mov ecx, esi
call fcn.0040f740
mov dword [esp + 0x38], eax
jmp 0x40fec8
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x60]
xor ecx, ecx
cmp eax, 9
jle 0x40fee2
cdq
mov ebx, 0xa
idiv ebx
add ecx, edx
cmp eax, 9
jg 0x40fed3
add ecx, eax
cmp ecx, 9
jle 0x40fef5
push ecx
mov ecx, esi
call fcn.0040f740
mov ebx, eax
jmp 0x40fef7
mov ebx, ecx
xor ecx, ecx
cmp edi, 9
mov eax, edi
jle 0x40ff0f
cdq
mov edi, 0xa
idiv edi
add ecx, edx
cmp eax, 9
jg 0x40ff00
add ecx, eax
cmp ecx, 9
jle 0x40ff22
push ecx
mov ecx, esi
call fcn.0040f740
mov edi, eax
jmp 0x40ff24
mov edi, ecx
mov eax, dword [esp + 0x40]
xor ecx, ecx
cmp eax, 9
jle 0x40ff3f
nop
cdq
mov esi, 0xa
idiv esi
add ecx, edx
cmp eax, 9
jg 0x40ff30
add ecx, eax
cmp ecx, 9
jle 0x40ff54
push ecx
mov ecx, dword [esp + 0x40]
call fcn.0040f740
mov esi, eax
jmp 0x40ff56
mov esi, ecx
xor ecx, ecx
cmp ebp, 9
mov eax, ebp
jle 0x40ff6f
nop
cdq
mov ebp, 0xa
idiv ebp
add ecx, edx
cmp eax, 9
jg 0x40ff60
add ecx, eax
xor ebp, ebp
cmp ecx, 9
jle 0x40ff84
push ecx
mov ecx, dword [esp + 0x40]
call fcn.0040f740
jmp 0x40ff86
mov eax, ecx
cmp dword [esp + 0xa8], eax
jne 0x410641
cmp dword [esp + 0xb4], edi
jne 0x410641
cmp dword [esp + 0xb0], esi
jne 0x410641
mov ecx, dword [esp + 0xa4]
cmp ecx, dword [esp + 0x30]
jne 0x410641
mov edx, dword [esp + 0xac]
cmp edx, dword [esp + 0x34]
jne 0x410641
mov eax, dword [esp + 0xa0]
cmp eax, dword [esp + 0x38]
jne 0x410641
cmp dword [esp + 0x64], ebx
jne 0x410641
push 0x45d77d
lea ecx, [esp + 0x48]
call fcn.00401a60
xor edi, edi
mov ebx, 0x10
nop
cmp dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x18]
jae 0x41000e
lea eax, [esp + 0x18]
movsx eax, byte [eax + edi]
sub eax, 0x26
push 1
lea esi, [eax - 1]
push esi
lea ecx, [esp + 0xc0]
push ecx
lea ecx, [esp + 0x20]
call fcn.00401980
lea edx, [esp + 0x44]
push edx
push eax
lea eax, [esp + 0x8c]
push eax
mov byte [esp + 0x190], 4
call fcn.00404ee0
add esp, 0xc
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x50]
mov byte [esp + 0x190], 5
call fcn.00401710
cmp dword [esp + 0x9c], ebx
jb 0x410078
mov ecx, dword [esp + 0x88]
push ecx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0xd0], ebx
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], ebp
mov byte [esp + 0x88], 0
mov byte [esp + 0x184], 2
jb 0x4100b3
mov edx, dword [esp + 0xbc]
push edx
call fcn.00440afe
add esp, 4
push 1
push esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0xd8], 0xf
mov dword [esp + 0xd4], ebp
mov byte [esp + 0xc4], 0
call fcn.00401240
inc edi
cmp edi, 6
jl 0x410000
push 2
push 0
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x50]
call fcn.00401980
mov esi, eax
push 2
push 4
lea ecx, [esp + 0x70]
push ecx
lea ecx, [esp + 0x50]
mov byte [esp + 0x190], 6
call fcn.00401980
mov edi, eax
push 2
push 2
lea edx, [esp + 0xdc]
push edx
lea ecx, [esp + 0x50]
mov byte [esp + 0x190], 7
call fcn.00401980
push eax
lea eax, [esp + 0x12c]
push 0x460100
push eax
mov byte [esp + 0x190], 8
call fcn.0040e740
push 0x4600fc
push eax
lea ecx, [esp + 0x174]
push ecx
mov byte [esp + 0x19c], 9
call fcn.00404f80
push edi
push eax
lea edx, [esp + 0x164]
push edx
mov byte [esp + 0x1a8], 0xa
call fcn.00404ee0
push 0x4600fc
push eax
lea eax, [esp + 0xb0]
push eax
mov byte [esp + 0x1b4], 0xb
call fcn.00404f80
push esi
push eax
lea ecx, [esp + 0xf0]
push ecx
mov byte [esp + 0x1c0], 0xc
call fcn.00404ee0
add esp, 0x3c
mov ebp, dword [esp + 0x194]
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebp
mov byte [esp + 0x190], 0xd
call fcn.00401710
mov eax, dword [esp + 0xd0]
mov ebx, 0x10
cmp eax, ebx
jb 0x4101f0
mov edx, dword [esp + 0xbc]
push edx
call fcn.00440afe
add esp, 4
mov eax, dword [esp + 0x9c]
xor esi, esi
cmp eax, ebx
mov edi, 0xf
mov dword [esp + 0xd0], edi
mov dword [esp + 0xcc], esi
mov byte [esp + 0xbc], 0
jb 0x410228
mov eax, dword [esp + 0x88]
push eax
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x15c], ebx
mov dword [esp + 0x9c], edi
mov dword [esp + 0x98], esi
mov byte [esp + 0x88], 0
jb 0x410257
mov ecx, dword [esp + 0x148]
push ecx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x178], ebx
mov dword [esp + 0x15c], edi
mov dword [esp + 0x158], esi
mov byte [esp + 0x148], 0
jb 0x410286
mov edx, dword [esp + 0x164]
push edx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x140], ebx
mov dword [esp + 0x178], edi
mov dword [esp + 0x174], esi
mov byte [esp + 0x164], 0
jb 0x4102b5
mov eax, dword [esp + 0x12c]
push eax
call fcn.00440afe
add esp, 4
cmp dword [esp + 0xec], ebx
mov dword [esp + 0x140], edi
mov dword [esp + 0x13c], esi
mov byte [esp + 0x12c], 0
jb 0x4102e4
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x80], ebx
mov dword [esp + 0xec], edi
mov dword [esp + 0xe8], esi
mov byte [esp + 0xd8], 0
jb 0x410310
mov edx, dword [esp + 0x6c]
push edx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x108], ebx
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], esi
mov byte [esp + 0x6c], 0
mov byte [esp + 0x184], 2
jb 0x410341
mov eax, dword [esp + 0xf4]
push eax
call fcn.00440afe
add esp, 4
lea ecx, [esp + 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx edx, word [esp + 0x8a]
movzx eax, word [esp + 0x86]
movzx ecx, word [esp + 0x84]
push edx
push eax
push ecx
call fcn.00403ed0
push ebp
mov esi, eax
call fcn.0040f7c0
add esp, 0x10
cmp eax, esi
jle 0x410396
mov ecx, dword [esp + 0x198]
push 0x28
push 0x4600d0
call fcn.00401800
jmp 0x410659
push 0
push 0x45d77d
lea ecx, [esp + 0x4c]
call fcn.00401800
xor edi, edi
jmp 0x4103b0
cmp dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x18]
jae 0x4103be
lea eax, [esp + 0x18]
movsx eax, byte [eax + edi]
sub eax, 0x26
push 1
lea esi, [eax - 1]
push esi
lea edx, [esp + 0xdc]
push edx
lea ecx, [esp + 0x20]
call fcn.00401980
lea ecx, [esp + 0x44]
push ecx
push eax
lea edx, [esp + 0x70]
push edx
mov byte [esp + 0x190], 0xe
call fcn.00404ee0
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x50]
mov byte [esp + 0x190], 0xf
call fcn.00401710
cmp dword [esp + 0x80], ebx
jb 0x410423
mov eax, dword [esp + 0x6c]
push eax
call fcn.00440afe
add esp, 4
cmp dword [esp + 0xec], ebx
mov dword [esp + 0x80], 0xf
mov dword [esp + 0x7c], 0
mov byte [esp + 0x6c], 0
mov byte [esp + 0x184], 2
jb 0x41045c
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.00440afe
add esp, 4
push 1
push esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0xf4], 0xf
mov dword [esp + 0xf0], 0
mov byte [esp + 0xe0], 0
call fcn.00401240
inc edi
cmp edi, 5
jl 0x4103b0
cmp dword [esp + 0x5c], ebx
mov eax, dword [esp + 0x48]
jae 0x41049e
lea eax, [esp + 0x48]
push eax
call fcn.00431bee
mov ecx, dword [esp + 0x40]
add esp, 4
push eax
call fcn.0040f740
cmp eax, 9
jne 0x4104ce
mov ecx, dword [esp + 0x198]
push 8
push 0x4600c4
call fcn.00401800
jmp 0x410659
cmp dword [esp + 0x5c], ebx
mov eax, dword [esp + 0x48]
jae 0x4104dc
lea eax, [esp + 0x48]
movsx edx, byte [eax]
sub edx, 0x30
test edx, edx
jle 0x410659
push 4
push 2
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x50]
call fcn.00401980
cmp dword [eax + 0x18], ebx
jb 0x410509
mov eax, dword [eax + 4]
jmp 0x41050c
add eax, 4
mov ecx, dword [esp + 0x5c]
cmp ecx, ebx
mov edi, dword [esp + 0x48]
mov esi, edi
jae 0x410520
lea esi, [esp + 0x48]
mov edi, esi
push eax
call fcn.00431bee
movsx ecx, byte [esi]
cdq
sub ecx, 0x30
idiv ecx
movsx edx, byte [edi + 1]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x108]
sub esi, edx
add esi, 0x30
cmp eax, ebx
jb 0x410558
mov eax, dword [esp + 0xf4]
push eax
call fcn.00440afe
add esp, 4
push ebp
call fcn.0040f7c0
add eax, esi
push eax
lea ecx, [esp + 0xf8]
push ecx
call fcn.0040fa40
push eax
lea edx, [esp + 0x78]
push 0x4600b4
push edx
mov byte [esp + 0x19c], 0x10
call fcn.0040e740
add esp, 0x18
mov ecx, dword [esp + 0x198]
push 0xffffffffffffffff
push 0
push eax
mov byte [esp + 0x190], 0x11
call fcn.00401710
cmp dword [esp + 0x80], ebx
jb 0x4105b8
mov eax, dword [esp + 0x6c]
push eax
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x108], ebx
mov dword [esp + 0x80], 0xf
mov dword [esp + 0x7c], 0
mov byte [esp + 0x6c], 0
mov byte [esp + 0x184], 2
jb 0x4105f1
mov ecx, dword [esp + 0xf4]
push ecx
call fcn.00440afe
add esp, 4
push ebp
call fcn.0040f7c0
add eax, esi
push eax
lea edx, [esp + 0xf8]
push edx
call fcn.0040fa40
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebp
mov byte [esp + 0x190], 0x12
call fcn.00401710
cmp dword [esp + 0x108], ebx
mov byte [esp + 0x184], 2
jb 0x410659
mov eax, dword [esp + 0xf4]
push eax
call fcn.00440afe
add esp, 4
jmp 0x410659
mov ecx, dword [esp + 0x198]
push 0xc
push 0x4600a4
call fcn.00401800
mov ebx, 0x10
push 0xffffffffffffffff
xor edi, edi
push edi
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x118]
call fcn.00401710
mov esi, dword [esp + 0x18c]
push 0xffffffffffffffff
push edi
lea edx, [esp + 0x114]
mov ebp, 0xf
mov dword [esi + 0x18], ebp
mov dword [esi + 0x14], edi
push edx
mov ecx, esi
mov byte [esi + 4], 0
call fcn.00401710
cmp dword [esp + 0x124], ebx
jb 0x4106b0
mov eax, dword [esp + 0x110]
push eax
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x5c], ebx
mov dword [esp + 0x124], ebp
mov dword [esp + 0x120], edi
mov byte [esp + 0x110], 0
jb 0x4106d9
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00440afe
add esp, 4
cmp dword [esp + 0x2c], ebx
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x58], edi
mov byte [esp + 0x48], 0
jb 0x4106f9
mov edx, dword [esp + 0x18]
push edx
call fcn.00440afe
add esp, 4
mov ecx, dword [esp + 0x17c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x178
ret 0x10