Function at 0x10158210
Capabilities:
Enumerate pe sections
Validate payment card number using luhn algorithm

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0x24]
push edi
mov byte [esp + 0x28], 0
mov eax, dword [esi + 0x18]
lea ebx, [esi + 0x8a0]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x20], ebx
mov dword [eax], 0
nop
push ebp
push 0xa
push dword [esp + 0x34]
call sub.VCRUNTIME140.dll_memchr
mov edi, eax
add esp, 0xc
test edi, edi
je 0x10158a3a
mov eax, dword [esp + 0x2c]
sub edi, eax
inc edi
push edi
push eax
push ebx
call fcn.101374b0
add esp, 0xc
test eax, eax
jne 0x10158855
mov eax, dword [esp + 0x34]
sub ebp, edi
add dword [esp + 0x2c], edi
mov dword [esp + 0x30], ebp
add dword [eax], edi
cmp dword [esi + 0xc4], 0
jne 0x10158302
push ebx
call fcn.10137510
mov ebx, eax
lea eax, [esi + 0x8a0]
push eax
call fcn.10137520
mov edi, dword [esp + 0x18]
add esp, 8
mov ecx, dword [edi + 0x260]
test dword [ecx + 0x44], 0x40000
je 0x101582e6
cmp ebx, 5
mov ecx, 5
mov ebp, 2
sbb edi, edi
inc edi
cmp ebx, 5
cmova ebx, ecx
push ebx
push eax
push 0x11174108
call fcn.10150be0
add esp, 0xc
test eax, eax
cmovne ebp, edi
mov edi, dword [esp + 0x10]
jmp 0x101582f3
push ebx
push eax
push esi
call fcn.10157970
add esp, 0xc
mov ebp, eax
cmp ebp, 2
je 0x10158954
lea ebx, [esi + 0x8a0]
push ebx
call fcn.10137520
push ebx
mov dword [esp + 0x1c], eax
call fcn.10137510
mov edx, dword [esp + 0x1c]
add esp, 8
mov ebp, eax
mov dword [esp + 0x18], ebp
mov cl, byte [edx]
cmp cl, 0xa
je 0x1015885d
cmp cl, 0xd
je 0x1015885d
mov ecx, dword [esi + 0xc4]
mov edi, 4
lea eax, [ecx + 1]
mov dword [esi + 0xc4], eax
test ecx, ecx
jne 0x10158722
mov eax, dword [esp + 0x10]
mov dword [esi + 0xd0], ecx
mov eax, dword [eax + 0x260]
mov eax, dword [eax + 0x44]
test al, 3
je 0x10158505
mov al, byte [edx]
mov edi, edx
test al, al
je 0x10158382
cmp al, 0x20
je 0x1015837a
cmp al, 9
jne 0x10158382
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10158372
push 5
push 0x11174100
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x10158434
movsx ecx, byte [edi + 5]
mov eax, ecx
sub eax, 0x31
je 0x10158465
sub eax, 1
je 0x101583b8
sub eax, 1
jne 0x1015898d
mov al, byte [edi + 6]
cmp al, 0x20
je 0x101583c3
cmp al, 9
jne 0x10158434
lea eax, [ecx - 0x30]
lea eax, [eax + eax*4]
add eax, eax
mov dword [esi + 0xd0], eax
mov cl, byte [edi + 7]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x10158434
mov bl, byte [edi + 8]
lea eax, [ebx - 0x30]
cmp al, 9
ja 0x1015842e
mov dl, byte [edi + 9]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x1015842e
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, bl
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [esi + 0xd4], eax
mov al, byte [edi + 0xa]
cmp al, 0x20
je 0x101585dd
cmp al, 9
je 0x101585dd
cmp al, 0xa
jl 0x1015842e
cmp al, 0xd
jle 0x101585dd
lea ebx, [esi + 0x8a0]
mov ecx, dword [esp + 0x14]
push ebp
push ecx
push esi
call fcn.10157970
add esp, 0xc
cmp eax, 1
jne 0x101589cf
mov dword [esi + 0xd4], 0xc8
mov dword [esi + 0xd0], 0xa
jmp 0x101585dd
cmp byte [edi + 6], 0x2e
jne 0x101584ea
mov al, byte [edi + 7]
cmp al, 0x30
je 0x10158476
cmp al, 0x31
jne 0x101584ea
mov cl, byte [edi + 8]
cmp cl, 0x20
je 0x10158483
cmp cl, 9
jne 0x101584ea
movsx eax, al
sub eax, 0x26
mov dword [esi + 0xd0], eax
mov cl, byte [edi + 9]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x101584ea
mov bl, byte [edi + 0xa]
lea eax, [ebx - 0x30]
cmp al, 9
ja 0x101584ea
mov dl, byte [edi + 0xb]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x101584ea
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, bl
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [esi + 0xd4], eax
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0x101585dd
cmp al, 9
je 0x101585dd
sub al, 0xa
cmp al, 3
jbe 0x101585dd
push 0x111745a4
push esi
call fcn.1014b4f0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
test eax, 0x40000
je 0x101589cf
mov al, byte [edx]
mov edi, edx
test al, al
je 0x10158528
cmp al, 0x20
je 0x10158520
cmp al, 9
jne 0x10158528
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10158518
push 5
push 0x11174108
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x101589cf
mov al, byte [edi + 5]
sub al, 0x30
cmp al, 9
ja 0x10158ae3
cmp byte [edi + 6], 0x2e
jne 0x10158ae3
mov al, byte [edi + 7]
sub al, 0x30
cmp al, 9
ja 0x10158ae3
mov al, byte [edi + 8]
cmp al, 0x20
je 0x10158574
cmp al, 9
jne 0x10158ae3
mov cl, byte [edi + 9]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x10158ae3
mov bl, byte [edi + 0xa]
lea eax, [ebx - 0x30]
cmp al, 9
ja 0x10158ae3
mov dl, byte [edi + 0xb]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x10158ae3
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, bl
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [esi + 0xd4], eax
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0x101585d3
cmp al, 9
je 0x101585d3
sub al, 0xa
cmp al, 3
ja 0x10158ae3
mov dword [esi + 0xd0], 0xb
mov ecx, dword [esi + 0xd0]
mov eax, ecx
sub eax, 0xa
je 0x101585f3
sub eax, 1
jne 0x101589a8
mov ebx, dword [esp + 0x10]
mov byte [ebx + 0x4d4], cl
mov eax, dword [esi + 0xd4]
mov dword [esi + 0xd38], eax
mov eax, dword [esi + 0xd0]
mov dword [esi + 0xd40], eax
movzx eax, byte [esi + 0xd0]
mov byte [ebx + 0x4d4], al
mov al, byte [esi + 0xd15]
test al, al
je 0x1015863b
mov ecx, dword [esi + 0xd0]
movzx eax, al
cmp eax, ecx
jle 0x1015864d
jmp 0x10158641
mov cl, byte [esi + 0xd0]
mov byte [esi + 0xd15], cl
mov ecx, dword [esi + 0xd0]
mov eax, dword [esi + 0xbf8]
or eax, dword [esi + 0xbfc]
je 0x10158677
cmp byte [esi + 0xd16], 0
jne 0x10158677
cmp dword [esi + 0xd4], 0x1a0
jne 0x10158677
mov byte [esi + 0x136], 1
cmp ecx, 0xa
jne 0x10158694
push 0x11174318
push esi
call fcn.1014b5c0
push 1
push ebx
call fcn.1014dae0
add esp, 0x10
jmp 0x101586b7
cmp ecx, 0x14
je 0x101586ab
cmp dword [esi + 0xdc], 2
jne 0x101586b7
cmp dword [esi + 0xd4], 0x65
jne 0x101586b7
mov eax, dword [ebx + 0x4a8]
mov dword [eax], 2
mov ecx, dword [esi + 0xd4]
lea eax, [ecx - 0x64]
cmp eax, 0x63
setbe al
mov byte [esi + 0x137], al
sub ecx, 0xcc
je 0x101586e8
sub ecx, 0x64
jne 0x10158717
cmp byte [esi + 0x3b0], cl
je 0x101586e8
mov byte [esi + 0xdf8], 1
mov dword [esi + 0x88], 0
mov dword [esi + 0x8c], 0
mov dword [esi + 0x90], 0
mov dword [esi + 0x94], 0
mov byte [esi + 0x137], 1
mov edi, 0xc
lea ebx, [esi + 0x8a0]
push ebx
call fcn.10137520
mov ebx, eax
lea eax, [esi + 0x8a0]
push eax
call fcn.10137510
mov ebp, eax
push ebp
push 0
push ebx
call sub.VCRUNTIME140.dll_memchr
add esp, 0x14
test eax, eax
jne 0x101589ff
mov ecx, dword [esi + 0xc4]
cmp ecx, 2
jl 0x1015877a
mov al, byte [ebx]
cmp al, 0x20
je 0x10158761
cmp al, 9
jne 0x10158766
cmp ecx, 2
jg 0x1015877a
push ebp
push 0x3a
push ebx
call sub.VCRUNTIME140.dll_memchr
add esp, 0xc
test eax, eax
je 0x101589dd
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push ebx
push ebp
push dword [esp + 0x18]
push esi
call fcn.10155fa0
add esp, 0x10
test eax, eax
jne 0x10158855
push ebx
push ebp
push 1
push esi
call fcn.1014b440
mov eax, dword [esi + 0xd4]
add esp, 0x10
sub eax, 0x64
cmp eax, 0x64
jae 0x101587b7
or edi, 0x20
push ebx
push ebp
push edi
push esi
call fcn.1014c450
add esp, 0x10
test eax, eax
jne 0x10158855
mov edx, dword [esi + 0xbc]
mov ecx, 0x4b000
cmp ebx, ecx
jae 0x10158811
mov eax, dword [esi + 0xd78]
add edx, ebx
add dword [esi + 0xb8], ebx
add eax, ebx
mov dword [esi + 0xd78], eax
mov dword [esi + 0xbc], edx
cmp edx, ecx
ja 0x101589f9
cmp eax, 0x5dc000
jbe 0x1015881c
mov ecx, 0x5dc000
push ecx
push eax
jmp 0x10158a1f
lea eax, [edx + ebx]
test eax, eax
jne 0x101589fb
lea ebx, [esi + 0x8a0]
push ebx
call fcn.10137530
mov ebp, dword [esp + 0x34]
add esp, 4
test ebp, ebp
jne 0x10158240
lea edi, [esi + 0x12d]
mov al, byte [esp + 0x28]
cmp byte [edi], 0
jne 0x10158853
test al, al
jne 0x10158853
push ebx
call fcn.101374c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push ebp
push edx
push 1
push esi
call fcn.1014b440
mov eax, dword [esi + 0xd4]
mov ecx, dword [esp + 0x24]
sub eax, 0x64
cmp eax, 0x64
push ebp
sbb eax, eax
and eax, 0x20
push ecx
add eax, 4
push eax
push esi
call fcn.1014c450
add esp, 0x20
test eax, eax
jne 0x10158855
mov edi, dword [esi + 0xbc]
mov edx, 0x4b000
cmp ebp, edx
jae 0x101588d4
mov ecx, dword [esi + 0xd78]
add edi, ebp
add dword [esi + 0xb8], ebp
add ecx, ebp
mov dword [esi + 0xd78], ecx
mov dword [esi + 0xbc], edi
cmp edi, edx
ja 0x10158a1b
cmp ecx, 0x5dc000
jbe 0x101588df
mov edx, 0x5dc000
jmp 0x10158a1d
lea ecx, [edi + ebp]
test ecx, ecx
jne 0x10158a1d
push ebx
call fcn.10137530
mov eax, dword [esi + 0xd4]
add esp, 4
sub eax, 0x64
cmp eax, 0x63
ja 0x101588fe
mov eax, dword [esi + 0xb8]
jmp 0x10158900
xor eax, eax
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
mov dword [esi + 0xc0], eax
lea eax, [esp + 0x1c]
push eax
push ebp
push edi
push esi
call fcn.10157ac0
add esp, 0x10
test eax, eax
jne 0x10158855
mov eax, dword [esp + 0x1c]
sub ebp, eax
mov ecx, dword [esp + 0x34]
add edi, eax
mov dword [esp + 0x2c], edi
lea edi, [esi + 0x12d]
add dword [ecx], eax
cmp byte [edi], 0
je 0x1015883d
test ebp, ebp
je 0x1015883d
jmp 0x10158240
push 2
push edi
call fcn.1014dae0
add esp, 8
cmp byte [edi + 0x4d4], 0xa
jae 0x10158ad5
cmp byte [esi + 0x6d5], 0
je 0x10158aba
mov ebx, dword [esp + 0x20]
lea edi, [esi + 0x12d]
mov byte [edi], 0
mov al, 1
jmp 0x10158841
push 0x111745d0
push esi
call fcn.1014b4f0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, ecx
mov ecx, 0xa
cdq
idiv ecx
push edx
push eax
push 0x111742e8
push esi
call fcn.1014b4f0
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
lea edi, [esi + 0x12d]
mov byte [edi], 0
jmp 0x1015883d
mov eax, 0x11174350
push eax
push esi
call fcn.1014b4f0
add esp, 8
mov eax, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, edx
push ecx
push eax
jmp 0x10158a1f
mov eax, 0x1117433c
push eax
push esi
call fcn.1014b4f0
add esp, 8
mov eax, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, edi
push edx
push ecx
push 0x11174368
push esi
call fcn.1014b4f0
add esp, 0x10
mov eax, 0x38
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push ebp
push dword [esp + 0x30]
push ebx
call fcn.101374b0
add esp, 0xc
test eax, eax
jne 0x10158855
mov eax, dword [esp + 0x34]
add dword [eax], ebp
cmp dword [esi + 0xc4], 0
jne 0x10158837
push ebx
call fcn.10137510
add esp, 4
push eax
push ebx
call fcn.10137520
mov ebp, dword [esp + 0x18]
add esp, 4
push eax
push ebp
push esi
call fcn.10157a20
add esp, 0x10
cmp eax, 2
jne 0x10158837
push eax
lea edi, [esi + 0x12d]
mov byte [edi], 0
push ebp
call fcn.1014dae0
add esp, 8
cmp byte [ebp + 0x4d4], 0xa
jae 0x10158ad5
cmp byte [esi + 0x6d5], 0
je 0x10158aba
mov al, 1
jmp 0x10158841
push 0x11174580
push esi
call fcn.1014b4f0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push 0x1117456c
push esi
call fcn.1014b4f0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x14
ret