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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [esp + 0xf4]
mov ebp, dword [esp + 0xf0]
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xf4]
mov eax, dword [eax + 4]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xf4]
movzx eax, byte [eax + 0xd]
mov byte [esp + 0x10], al
shr al, 2
and eax, 1
mov dword [esp + 0x14], eax
call dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_localeconv]
mov esi, dword [esp + 0xf4]
test byte [esi + 0xd], 1
je 0x6d165968
mov esi, dword [eax + 0x14]
mov dword [esp + 0x10], esi
test esi, esi
je 0x6d165968
cmp byte [esi], 0
jne 0x6d165989
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x10]
test edi, edi
je 0x6d165c38
cmp byte [edi], 0
mov eax, 0x6d181da0
cmovne eax, edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xf8]
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, dword [eax]
mov edi, dword [eax + 4]
mov esi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
mov dword [esp], edx
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x60], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], ebx
call sym.libquadmath_0.dll_isnanq
mov edx, dword [esp + 0x18]
test eax, eax
je 0x6d165bc0
mov eax, dword [esp + 0xf4]
movsx ebx, byte [esp + 0x6f]
movzx eax, word [eax + 8]
shr ebx, 0x1f
mov dword [esp], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isupper]
test eax, eax
jne 0x6d165ab8
mov ecx, 0x6d181dba
mov esi, 0x6d181dbe
mov eax, dword [esp + 0xf4]
movzx edx, byte [eax + 0xc]
mov edi, dword [eax + 4]
mov eax, edx
and eax, 0x20
test ebx, ebx
jne 0x6d165ad0
test dl, 0x50
jne 0x6d165c48
sub edi, 3
test al, al
jne 0x6d165a34
test edi, edi
jg 0x6d166318
mov eax, dword [ebp + 0x10]
mov edx, dword [esp + 0x14]
test edx, edx
jne 0x6d165b19
sub ecx, ebx
mov dword [esp + 0x10], edi
lea esi, [ebx + 3]
mov edi, ecx
movsx dx, byte [edi + ebx]
test eax, eax
jne 0x6d165a88
mov eax, dword [ebp + 8]
test eax, eax
je 0x6d165a6d
mov eax, dword [ebp + 4]
lea ecx, [eax + 1]
mov dword [ebp + 4], ecx
mov byte [eax], dl
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
add ebx, 1
cmp esi, ebx
je 0x6d165c98
mov eax, dword [ebp + 0x10]
movsx dx, byte [edi + ebx]
test eax, eax
je 0x6d165a57
mov eax, dword [ebp]
movzx edx, dx
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
jne 0x6d165a71
mov esi, 0xffffffff
add esp, 0xdc
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, 0x6d181dae
mov esi, 0x6d181db2
jmp 0x6d165a01
sub edi, 4
test al, al
jne 0x6d165adf
test edi, edi
jg 0x6d166390
xor ebx, ebx
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x6d166360
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d165b06
mov eax, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x2d
mov eax, dword [ebp + 0x10]
sub dword [ebp + 8], 1
mov edx, dword [esp + 0x14]
add dword [ebp + 0xc], 1
add ebx, 1
test edx, edx
je 0x6d165a43
lea edx, [esi + 4]
mov dword [esp + 0x10], edx
movzx edx, word [esi]
test eax, eax
jne 0x6d165b54
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x6d165b3d
mov eax, dword [ebp + 4]
lea ecx, [eax + 1]
mov dword [ebp + 4], ecx
mov byte [eax], dl
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
cmp dword [esp + 0x10], esi
je 0x6d165b69
mov eax, dword [ebp + 0x10]
add esi, 2
movzx edx, word [esi]
test eax, eax
je 0x6d165b27
mov eax, dword [ebp]
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
cmp dword [esp + 0x10], esi
jne 0x6d165b47
lea esi, [ebx + 3]
mov eax, dword [esp + 0xf4]
test byte [eax + 0xc], 0x20
je 0x6d165aa4
test edi, edi
jle 0x6d165aa4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x20
mov eax, dword [esp + 0x14]
mov dword [esp], ebp
mov dword [esp + 4], eax
call sym.libquadmath_0.dll___quadmath_do_pad
cmp edi, eax
jne 0x6d165a9f
add esp, 0xdc
add esi, edi
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
mov dword [esp], edx
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], edx
call sym.libquadmath_0.dll_isinfq
mov edx, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x30], eax
je 0x6d165ca8
mov eax, dword [esp + 0xf4]
mov dword [esp + 0x10], edx
movzx eax, word [eax + 8]
mov dword [esp], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isupper]
mov edx, dword [esp + 0x10]
mov dword [esp + 4], edi
test eax, eax
mov dword [esp + 8], esi
mov dword [esp], edx
mov dword [esp + 0xc], ebx
jne 0x6d1663f0
call sym.libquadmath_0.dll_signbitq
mov esi, 0x6d181dca
mov ecx, 0x6d181dc6
mov ebx, eax
jmp 0x6d165a01
mov dword [esp + 0x10], 0x6d181da0
jmp 0x6d165989
sub edi, 4
test al, al
je 0x6d166310
mov eax, dword [ebp + 0x10]
test dl, 0x40
jne 0x6d1663c8
and edx, 0x10
je 0x6d165a37
test eax, eax
jne 0x6d1665f8
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d165b06
mov eax, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x20
mov eax, dword [ebp + 0x10]
sub dword [ebp + 8], 1
jmp 0x6d165b06
mov edi, dword [esp + 0x10]
jmp 0x6d165b6c
mov dword [esp], edx
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov esi, 0xf
mov dword [esp + 0xc], ebx
lea ebx, [esp + 0x90]
call sym.libquadmath_0.dll_signbitq
mov edx, 0x6d181e30
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xf0], ebp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xf4]
mov dword [esp + 0x44], ecx
mov ecx, ebx
movzx eax, word [eax + 8]
cmp ax, 0x41
mov word [esp + 0x40], ax
mov eax, 0x6d181e20
cmovne eax, edx
mov edx, dword [esp + 0x64]
xor edi, edi
mov dword [esp + 0x20], eax
movzx eax, word [esp + 0x6c]
mov dword [esp + 0x3c], edx
mov word [esp + 0x28], ax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x38], eax
jmp 0x6d165d40
mov ebp, dword [esp + 0x20]
mov ebx, eax
sub ecx, 1
and ebx, 0xf
movzx ebx, byte [ebp + ebx]
mov ebp, eax
shrd eax, edx, 4
mov byte [ecx], bl
mov ebx, edx
shr edx, 4
cmp esi, ebp
mov ebp, edi
sbb ebp, ebx
jb 0x6d165d40
mov eax, str.0123456789ABCDEF0123456789abcdef
cmp word [esp + 0x40], 0x41
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov ebx, 0x6d181e00
lea edi, [esp + 0xd0]
cmove ebx, eax
mov eax, dword [esp + 0x38]
jmp 0x6d165dc0
mov ecx, eax
sub edi, 2
mov ebp, 0xf
and ecx, 0xf
mov esi, edx
movzx ecx, word [ebx + ecx*2]
mov word [edi], cx
mov ecx, eax
shrd eax, edx, 4
shr edx, 4
cmp ebp, ecx
mov ecx, 0
sbb ecx, esi
jb 0x6d165dc0
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x80]
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 0xf0]
cmp edx, eax
jae 0x6d165e85
mov esi, eax
mov dword [esp], edx
sub esi, edx
mov dword [esp + 4], 0x30
mov dword [esp + 8], esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x80]
xor eax, eax
sub edx, ecx
and ecx, 1
mov ecx, dword [esp + 0x44]
je 0x6d165e60
mov eax, 0x30
mov word [edi - 2], ax
mov eax, 0xffffffff
cmp eax, edx
je 0x6d165e75
lea esi, cs:[esi]
lea esi, cs:[esi]
lea esi, [esi]
mov word [edi + eax*2 - 2], 0x30
mov word [edi + eax*2 - 4], 0x30
sub eax, 2
cmp eax, edx
jne 0x6d165e60
lea eax, [esi + esi]
sub edi, eax
lea eax, [esp + 0x80]
mov dword [esp + 0x18], eax
movzx eax, word [esp + 0x28]
mov dword [esp + 0x44], ebx
mov dword [esp + 0xf0], ebp
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], edi
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x20]
lea esi, cs:[esi]
lea esi, [esi]
mov ebx, eax
mov esi, eax
sub ecx, 1
mov ebp, 0xf
and ebx, 0xf
shrd eax, edx, 4
movzx ebx, byte [edi + ebx]
mov byte [ecx], bl
mov ebx, edx
shr edx, 4
cmp ebp, esi
mov esi, 0
sbb esi, ebx
jb 0x6d165ec0
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
lea esi, [esi]
mov ecx, eax
mov esi, eax
sub edi, 2
mov ebp, 0xf
and ecx, 0xf
shrd eax, edx, 4
movzx ecx, word [ebx + ecx*2]
mov word [edi], cx
mov ecx, edx
shr edx, 4
cmp ebp, esi
mov esi, 0
sbb esi, ecx
jb 0x6d165f00
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x74]
mov ebp, dword [esp + 0xf0]
cmp ecx, esi
jae 0x6d165fa2
mov edx, ecx
xor eax, eax
sub edx, esi
and esi, 1
je 0x6d165f60
mov ebx, 0x30
mov eax, 0xffffffff
mov word [edi - 2], bx
cmp eax, edx
je 0x6d165f7b
lea esi, [esi]
mov ebx, 0x30
mov esi, 0x30
mov word [edi + eax*2 - 2], bx
mov word [edi + eax*2 - 4], si
sub eax, 2
cmp eax, edx
jne 0x6d165f60
mov esi, dword [esp + 0x18]
mov dword [esp + 4], 0x30
mov dword [esp], ecx
sub esi, ecx
mov dword [esp + 8], esi
lea ebx, [esi + esi]
sub edi, ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
lea eax, [esp + 0x74]
mov dword [esp + 0x18], eax
movzx eax, word [esp + 0x6e]
mov ebx, dword [esp + 0x2c]
and ax, 0x7fff
setne dl
movzx eax, ax
or ebx, dword [esp + 0x3c]
lea ecx, [edx + 0x30]
mov dword [esp + 0x20], eax
mov byte [esp + 0x44], cl
mov ecx, dword [esp + 0x28]
or ecx, dword [esp + 0x38]
test eax, eax
je 0x6d166480
mov eax, dword [esp + 0x20]
cmp eax, 0x3ffe
jle 0x6d166b00
mov dword [esp + 0x20], 0
sub eax, 0x3fff
mov edx, eax
mov eax, ecx
or eax, ebx
jne 0x6d166497
mov eax, 0xcccccccd
mov ecx, edx
mul edx
shr edx, 3
lea eax, [edx + edx*4]
mov edx, ecx
add eax, eax
sub edx, eax
cmp dword [esp + 0x1c], 0xffffffff
movzx eax, byte [edx + 0x6d181e30]
jne 0x6d166027
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], edx
mov byte [esp + 0x55], al
mov eax, 0xcccccccd
mul ecx
mov ebx, edx
shr ebx, 3
cmp ecx, 9
jbe 0x6d166ada
mov dword [esp + 0x40], edi
lea eax, [esp + 0x55]
mov esi, eax
jmp 0x6d166080
mov eax, 0xcccccccd
mov edi, ebx
sub esi, 1
mul ebx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub edi, eax
movzx eax, byte [edi + 0x6d181e30]
mov byte [esi], al
mov eax, ebx
mov ebx, edx
cmp eax, 9
ja 0x6d166080
mov dword [esp + 0x28], esi
mov ebx, 0xcccccccd
lea esi, [esp + 0x60]
lea esi, cs:[esi]
lea esi, [esi]
mov eax, ecx
mov edi, ecx
sub esi, 2
mul ebx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub edi, eax
movzx eax, word [edi + edi + 0x6d181e00]
mov word [esi], ax
mov eax, ecx
mov ecx, edx
cmp eax, 9
ja 0x6d1660c0
mov dword [esp + 0x48], esi
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0xf4]
mov edx, dword [esp + 0x34]
movzx ebx, byte [eax + 0xc]
mov eax, 4
test edx, edx
jne 0x6d166116
mov eax, ebx
and eax, 0x50
cmp al, 1
mov eax, 3
sbb eax, 0xffffffff
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x56]
sub edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x40], edx
lea eax, [ecx + eax + 2]
add eax, edx
mov edx, dword [esp + 0x24]
sub edx, eax
mov dword [esp + 0x24], edx
test ecx, ecx
jle 0x6d166688
mov esi, dword [esp + 0x14]
mov eax, 1
test esi, esi
jne 0x6d166159
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
sub dword [esp + 0x24], eax
and ebx, 0x20
jne 0x6d166180
mov eax, dword [esp + 0xf4]
cmp word [eax + 0x12], 0x30
je 0x6d166180
mov esi, dword [esp + 0x24]
test esi, esi
jg 0x6d166d48
lea esi, [esi]
mov ecx, dword [esp + 0x34]
mov eax, dword [ebp + 0x10]
test ecx, ecx
jne 0x6d166888
mov ecx, dword [esp + 0xf4]
movzx edx, byte [ecx + 0xc]
test dl, 0x40
jne 0x6d166b60
and edx, 0x10
jne 0x6d166d10
test eax, eax
je 0x6d166628
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
test edx, edx
je 0x6d166c4c
mov dword [esp + 4], eax
mov dword [esp], 0x30
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov eax, dword [esp + 0xf4]
movzx eax, word [eax + 8]
mov word [esp + 0x34], ax
lea ecx, [eax + 0x17]
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x6d166fae
lea esi, cs:[esi]
lea esi, [esi]
mov eax, dword [ebp + 8]
test eax, eax
je 0x6d166216
mov eax, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], cl
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0xf4]
add ebx, 2
test byte [eax + 0xc], 0x20
jne 0x6d166241
cmp word [eax + 0x12], 0x30
jne 0x6d166241
mov eax, dword [esp + 0x24]
test eax, eax
jg 0x6d166f54
mov esi, dword [ebp + 0x10]
test esi, esi
jne 0x6d166780
mov eax, dword [ebp + 8]
test eax, eax
je 0x6d166267
mov eax, dword [ebp + 4]
movzx ecx, byte [esp + 0x44]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], cl
sub dword [ebp + 8], 1
mov eax, dword [esp + 0x1c]
add dword [ebp + 0xc], 1
lea ecx, [ebx + 1]
test eax, eax
jle 0x6d166aa8
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x6d1666a0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], ecx
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, dword [esp + 0x30]
test eax, eax
lea edx, [eax - 1]
je 0x6d167090
mov eax, dword [esp + 0x10]
lea ebx, [ecx + edx + 1]
mov dword [esp + 0x10], edi
mov esi, ecx
sub eax, ecx
mov edi, eax
jmp 0x6d1662e5
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d1662d6
mov edx, dword [ebp + 4]
lea ecx, [edx + 1]
mov dword [ebp + 4], ecx
mov byte [edx], al
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
add esi, 1
cmp esi, ebx
je 0x6d166c08
mov ecx, dword [ebp + 0x10]
movsx ax, byte [edi + esi]
test ecx, ecx
je 0x6d1662c0
mov edx, dword [ebp]
movzx eax, ax
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
jne 0x6d1662da
jmp 0x6d165a9f
test edi, edi
jle 0x6d165c53
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], edi
mov ebx, edi
mov dword [esp + 8], 0x20
mov dword [esp + 4], eax
mov dword [esp], ebp
mov dword [esp + 0x10], ecx
call sym.libquadmath_0.dll___quadmath_do_pad
cmp edi, eax
jne 0x6d165a9f
mov eax, dword [esp + 0xf4]
mov ecx, dword [esp + 0x10]
movzx edx, byte [eax + 0xc]
jmp 0x6d165c53
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
test edx, edx
je 0x6d166450
mov dword [esp + 4], eax
add ebx, 1
mov dword [esp], 0x2d
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov eax, dword [ebp + 0x10]
jmp 0x6d165b19
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], edi
mov ebx, edi
mov dword [esp + 8], 0x20
mov dword [esp + 4], eax
mov dword [esp], ebp
mov dword [esp + 0x10], ecx
call sym.libquadmath_0.dll___quadmath_do_pad
mov ecx, dword [esp + 0x10]
cmp eax, edi
jne 0x6d165a9f
jmp 0x6d165ae1
test eax, eax
jne 0x6d166410
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d165b06
mov eax, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x2b
mov eax, dword [ebp + 0x10]
sub dword [ebp + 8], 1
jmp 0x6d165b06
call sym.libquadmath_0.dll_signbitq
mov esi, 0x6d181da6
mov ecx, 0x6d181da2
mov ebx, eax
jmp 0x6d165a01
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
test edx, edx
jne 0x6d1665d8
mov dword [esp + 4], eax
mov dword [esp], 0x2b
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
je 0x6d165a9f
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
add ebx, 1
jmp 0x6d165a43
mov dword [esp + 4], eax
mov dword [esp], 0x2d
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
mov ecx, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x6d165a9f
mov eax, dword [ebp + 0x10]
add ebx, 1
jmp 0x6d165a43
mov eax, ecx
or eax, ebx
je 0x6d166ac0
mov dword [esp + 0x20], 1
mov edx, 0x3ffe
cmp word [esp + 0xce], 0x30
jne 0x6d166ff8
lea ecx, [esp + 0x90]
lea eax, [esp + 0xd0]
lea esi, cs:[esi]
lea esi, [esi]
sub eax, 2
sub ecx, 1
cmp word [eax - 2], 0x30
je 0x6d1664c0
mov dword [esp + 0x38], ecx
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
sub ebx, eax
cmp dword [esp + 0x1c], 0xffffffff
je 0x6d166d7c
cmp dword [esp + 0x1c], ebx
jge 0x6d166ba7
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
movsx ecx, byte [esi + eax]
test eax, eax
jle 0x6d166fc8
movzx eax, byte [esi + eax - 1]
lea esi, [eax - 0x41]
mov byte [esp + 0x28], al
mov eax, esi
cmp al, 5
jbe 0x6d166f9a
movsx esi, byte [esp + 0x28]
mov eax, esi
sub eax, 0x61
cmp al, 5
ja 0x6d166fcd
lea eax, [esi - 0x57]
mov dword [esp + 0x48], eax
lea eax, [ecx - 0x41]
cmp al, 5
jbe 0x6d166e4d
lea eax, [ecx - 0x61]
cmp al, 5
jbe 0x6d166e4d
lea esi, [ecx - 0x30]
and ecx, 7
jne 0x6d16710e
mov eax, dword [esp + 0x1c]
add eax, 1
cmp eax, ebx
setl bl
setl cl
movzx ebx, bl
mov dword [esp + 0x28], edx
mov byte [esp + 0x4f], cl
call fcn.6d16e9c0
mov edx, dword [esp + 0x28]
test eax, eax
je 0x6d167080
js 0x6d1665ba
cmp esi, 7
movzx ecx, byte [esp + 0x4f]
setg bl
cmp eax, 0x400
je 0x6d1670fe
cmp eax, 0x800
jne 0x6d1665ba
cmp dword [esp + 0x34], 0
jne 0x6d166f31
test bl, bl
jne 0x6d166e8e
test cl, cl
jne 0x6d166e8e
mov eax, edx
mov ecx, edx
mov ebx, 0xa
xor edx, edx
div ebx
movzx eax, byte [edx + 0x6d181e30]
jmp 0x6d16602f
mov dword [esp + 4], eax
add ebx, 1
mov dword [esp], 0x2b
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov eax, dword [ebp + 0x10]
jmp 0x6d165b19
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
test edx, edx
je 0x6d166b38
mov dword [esp + 4], eax
add ebx, 1
mov dword [esp], 0x20
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov eax, dword [ebp + 0x10]
jmp 0x6d165b19
mov esi, dword [ebp + 8]
test esi, esi
je 0x6d16663f
mov eax, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x30
sub dword [ebp + 8], 1
mov eax, dword [esp + 0xf4]
mov ebx, dword [ebp + 0x10]
add dword [ebp + 0xc], 1
movzx eax, word [eax + 8]
mov word [esp + 0x34], ax
lea ecx, [eax + 0x17]
test ebx, ebx
je 0x6d166200
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
test edx, edx
je 0x6d166c86
mov dword [esp + 4], eax
movzx eax, cx
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
jmp 0x6d16621a
test bl, 8
je 0x6d16615d
jmp 0x6d166140
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x6d166760
mov esi, dword [ebp + 8]
test esi, esi
je 0x6d1666c2
mov eax, dword [ebp + 4]
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x2e
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
lea ebx, [ecx + 1]
mov edx, dword [esp + 0x1c]
test edx, edx
jle 0x6d16711d
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x14]
sub eax, ecx
mov ecx, edx
sub ecx, eax
cmp eax, edx
mov dword [esp + 0x10], ecx
cmovle edx, eax
test esi, esi
jne 0x6d1669c0
mov esi, dword [esp + 0x18]
lea ecx, [ebx + edx]
mov edi, ecx
sub esi, ebx
test edx, edx
jne 0x6d166735
jmp 0x6d16702c
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d166726
mov edx, dword [ebp + 4]
lea ecx, [edx + 1]
mov dword [ebp + 4], ecx
mov byte [edx], al
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
add ebx, 1
cmp ebx, edi
je 0x6d166d75
mov ecx, dword [ebp + 0x10]
movsx ax, byte [esi + ebx]
test ecx, ecx
je 0x6d166710
mov edx, dword [ebp]
movzx eax, ax
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
jne 0x6d16672a
jmp 0x6d165a9f
mov eax, dword [ebp]
mov dword [esp], 0x2e
mov dword [esp + 0x10], ecx
mov dword [esp + 4], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov ecx, dword [esp + 0x10]
jmp 0x6d1666c6
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp]
movsx eax, byte [esp + 0x44]
test ecx, ecx
mov dword [esp + 4], edx
mov dword [esp], eax
je 0x6d166ca8
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov eax, dword [esp + 0x1c]
lea ecx, [ebx + 1]
test eax, eax
jg 0x6d1666a0
mov eax, dword [esp + 0xf4]
test byte [eax + 0xc], 8
jne 0x6d1666a0
mov eax, dword [esp + 0xf4]
mov edi, dword [ebp + 0x10]
movzx eax, word [eax + 8]
mov word [esp + 0x10], ax
add eax, 0xf
test edi, edi
jne 0x6d1670a8
nop
mov esi, dword [ebp + 8]
test esi, esi
jne 0x6d1668c0
add dword [ebp + 0xc], 1
cmp dword [esp + 0x20], 1
sbb eax, eax
and eax, 0xfffffffe
add eax, 0x2d
mov edi, dword [ebp + 8]
test edi, edi
je 0x6d166812
mov edx, dword [ebp + 4]
lea ebx, [edx + 1]
mov dword [ebp + 4], ebx
mov byte [edx], al
sub dword [ebp + 8], 1
mov esi, dword [esp + 0x14]
add dword [ebp + 0xc], 1
lea ebx, [ecx + 2]
test esi, esi
je 0x6d16691a
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x48]
lea esi, [eax - 1]
test eax, eax
jne 0x6d166863
jmp 0x6d167025
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d166856
mov edx, dword [ebp + 4]
lea ecx, [edx + 1]
mov dword [ebp + 4], ecx
mov byte [edx], al
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
sub esi, 1
jb 0x6d166980
mov ecx, dword [ebp + 0x10]
add edi, 2
movzx eax, word [edi - 2]
test ecx, ecx
je 0x6d166840
mov edx, dword [ebp]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
jmp 0x6d16685a
test eax, eax
jne 0x6d166da1
mov esi, dword [ebp + 8]
test esi, esi
je 0x6d166b20
mov eax, dword [ebp + 4]
add dword [esp + 0x30], 1
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x2d
mov eax, dword [ebp + 0x10]
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
jmp 0x6d1661ac
mov edx, dword [ebp + 4]
lea ebx, [edx + 1]
mov dword [ebp + 4], ebx
mov byte [edx], al
mov edx, dword [ebp + 0x10]
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
cmp dword [esp + 0x20], 1
sbb eax, eax
and eax, 0xfffffffe
add eax, 0x2d
test edx, edx
je 0x6d1667fc
mov ebx, dword [esp + 0x14]
mov edx, dword [ebp]
test ebx, ebx
jne 0x6d166a86
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
je 0x6d165a9f
mov ecx, dword [esp + 0x10]
lea ebx, [ecx + 2]
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x28]
lea esi, [ebx + eax]
sub edi, ebx
test eax, eax
jne 0x6d166951
jmp 0x6d167025
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d166946
mov edx, dword [ebp + 4]
lea ecx, [edx + 1]
mov dword [ebp + 4], ecx
mov byte [edx], al
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
add ebx, 1
cmp esi, ebx
je 0x6d166986
mov ecx, dword [ebp + 0x10]
movsx ax, byte [edi + ebx]
test ecx, ecx
je 0x6d166930
mov edx, dword [ebp]
movzx eax, ax
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
jne 0x6d16694a
jmp 0x6d165a9f
mov esi, dword [esp + 0x40]
add esi, ebx
mov eax, dword [esp + 0xf4]
test byte [eax + 0xc], 0x20
je 0x6d165aa4
movzx eax, word [eax + 0x12]
cmp ax, 0x30
je 0x6d165aa4
mov edi, dword [esp + 0x24]
test edi, edi
jle 0x6d165aa4
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
jmp 0x6d165b91
test edx, edx
je 0x6d16702c
mov dword [esp + 0x18], edx
mov esi, edx
jmp 0x6d1669ef
mov edx, dword [ebp + 8]
test edx, edx
je 0x6d1669e6
mov edx, dword [ebp + 4]
lea ecx, [edx + 1]
mov dword [ebp + 4], ecx
mov byte [edx], al
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
sub esi, 1
je 0x6d166a10
mov ecx, dword [ebp + 0x10]
add edi, 2
movzx eax, word [edi - 2]
test ecx, ecx
je 0x6d1669d0
mov edx, dword [ebp]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
jmp 0x6d1669ea
mov edx, dword [esp + 0x18]
lea ecx, [ebx + edx]
mov edi, dword [esp + 0x10]
test edi, edi
jg 0x6d166bd0
mov eax, dword [esp + 0xf4]
mov esi, dword [ebp + 0x10]
movzx eax, word [eax + 8]
mov word [esp + 0x10], ax
add eax, 0xf
test esi, esi
je 0x6d1667e0
mov ebx, dword [esp + 0x14]
mov edx, dword [ebp]
movzx eax, ax
test ebx, ebx
je 0x6d166e28
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov edi, dword [esp + 0x20]
mov edx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
test edi, edi
je 0x6d166fb6
mov eax, 0x2d
test edx, edx
je 0x6d1667fc
mov edx, dword [ebp]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov ecx, dword [esp + 0x10]
lea ebx, [ecx + 2]
jmp 0x6d166825
mov eax, dword [esp + 0xf4]
test byte [eax + 0xc], 8
je 0x6d166a23
jmp 0x6d16627a
cmp dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x55], 0x30
je 0x6d166f83
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov dword [esp + 0x38], eax
movzx eax, word [ecx + ecx + 0x6d181e00]
mov word [esp + 0x5e], ax
lea eax, [esp + 0x55]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x5e]
mov dword [esp + 0x48], eax
jmp 0x6d1660ef
mov edx, dword [esp + 0x20]
mov eax, 0x3fff
mov dword [esp + 0x20], 1
sub eax, edx
mov edx, eax
jmp 0x6d165ff2
mov eax, dword [ebp + 0xc]
add dword [esp + 0x30], 1
add eax, 1
mov dword [ebp + 0xc], eax
jmp 0x6d16663f
mov dword [esp + 4], eax
mov dword [esp], 0x20
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
jne 0x6d16643c
jmp 0x6d165a9f
test eax, eax
jne 0x6d166c11
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x6d166b20
mov eax, dword [ebp + 4]
add dword [esp + 0x30], 1
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x2b
mov eax, dword [ebp + 0x10]
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
jmp 0x6d1661ac
movzx eax, word [esp + 0x40]
mov ebx, ebp
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0xf0]
mov word [ebx], ax
mov byte [esi], al
mov eax, 0xcccccccd
mov ecx, edx
mul edx
shr edx, 3
lea eax, [edx + edx*4]
mov edx, ecx
add eax, eax
sub edx, eax
movzx eax, byte [edx + 0x6d181e30]
jmp 0x6d16602f
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x30
mov dword [esp + 4], eax
mov dword [esp], ebp
mov dword [esp + 0x10], ecx
call sym.libquadmath_0.dll___quadmath_do_pad
cmp edi, eax
jne 0x6d165a9f
mov ecx, dword [esp + 0x10]
add ecx, edi
jmp 0x6d166a23
mov edi, dword [esp + 0x10]
jmp 0x6d1666c9
mov ebx, dword [esp + 0x14]
mov eax, dword [ebp]
mov dword [esp], 0x2b
test ebx, ebx
mov dword [esp + 4], eax
jne 0x6d166dbb
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
je 0x6d165a9f
mov ebx, dword [ebp + 0x10]
add dword [esp + 0x30], 1
test ebx, ebx
je 0x6d166628
mov eax, dword [ebp]
mov dword [esp + 4], eax
mov dword [esp], 0x30
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
je 0x6d165a9f
mov eax, dword [esp + 0xf4]
movzx eax, word [eax + 8]
mov word [esp + 0x34], ax
lea ecx, [eax + 0x17]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x6d166200
mov eax, dword [ebp]
mov dword [esp + 4], eax
movzx eax, cx
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
jne 0x6d16621a
jmp 0x6d165a9f
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
je 0x6d165a9f
mov eax, dword [esp + 0x1c]
lea ecx, [ebx + 1]
test eax, eax
jle 0x6d166dd8
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], ecx
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, dword [esp + 0x30]
test eax, eax
lea edx, [eax - 1]
jne 0x6d1662a5
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
mov ebx, ecx
sub eax, edx
mov edx, dword [esp + 0x1c]
mov edi, edx
sub edi, eax
cmp eax, edx
mov dword [esp + 0x10], edi
cmovle edx, eax
jmp 0x6d1666f8
test eax, eax
jne 0x6d166fd9
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x6d166b20
mov eax, dword [ebp + 4]
add dword [esp + 0x30], 1
lea edx, [eax + 1]
mov dword [ebp + 4], edx
mov byte [eax], 0x20
mov eax, dword [ebp + 0x10]
sub dword [ebp + 8], 1
add dword [ebp + 0xc], 1
jmp 0x6d1661ac
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x20
mov dword [esp + 4], eax
mov dword [esp], ebp
call sym.libquadmath_0.dll___quadmath_do_pad
cmp esi, eax
jne 0x6d165a9f
mov dword [esp + 0x30], esi
jmp 0x6d166180
mov ecx, edi
jmp 0x6d166a17
mov eax, 0xcccccccd
mov ecx, edx
mov dword [esp + 0x1c], ebx
mul edx
shr edx, 3
lea eax, [edx + edx*4]
mov edx, ecx
add eax, eax
sub edx, eax
movzx eax, byte [edx + 0x6d181e30]
jmp 0x6d16602f
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
mov dword [esp], 0x2d
test edx, edx
mov dword [esp + 4], eax
je 0x6d166c2b
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
mov esi, dword [ebp + 0x10]
add dword [esp + 0x30], 1
test esi, esi
je 0x6d166628
mov eax, dword [ebp]
jmp 0x6d1661c3
mov eax, dword [esp + 0xf4]
test byte [eax + 0xc], 8
je 0x6d166e04
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], ecx
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, dword [esp + 0x30]
test eax, eax
lea edx, [eax - 1]
jne 0x6d1662a5
mov eax, dword [esp + 0xf4]
mov esi, dword [ebp + 0x10]
movzx eax, word [eax + 8]
mov word [esp + 0x10], ax
add eax, 0xf
test esi, esi
je 0x6d1667e0
mov edx, dword [ebp]
movzx eax, ax
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x10], ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
cmp eax, 0xffffffff
je 0x6d165a9f
mov edx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
jmp 0x6d1668d6
mov dword [esp + 0x28], edx
call fcn.6d16e9c0
mov edx, dword [esp + 0x28]
cmp eax, 0x400
je 0x6d167044
cmp eax, 0x800
je 0x6d167033
test eax, eax
jne 0x6d166f31
mov ebx, 1
mov eax, dword [esp + 0x48]
or eax, ebx
mov ebx, eax
and ebx, 1
je 0x6d1665ba
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
sub eax, 1
add ecx, eax
lea ebx, [edi + eax*2]
test eax, eax
js 0x6d166f11
mov dword [esp + 0xf0], ebp
mov esi, ecx
mov ebp, ebx
mov dword [esp + 0x48], edx
jmp 0x6d166ec2
mov ebp, eax
movzx ebx, byte [esi]
cmp bl, 0x39
je 0x6d166b90
movsx eax, bl
mov dword [esp], eax
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov dword [esp + 0x28], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
cmp eax, 0x65
jle 0x6d167008
mov eax, 0x30
mov byte [esi], 0x30
sub esi, 1
mov word [ebp], ax
lea eax, [ebp - 2]
cmp ebp, edi
jne 0x6d166ec0
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0xf0]
mov esi, dword [esp + 0x28]
movsx eax, byte [esp + 0x44]
mov dword [esp + 0x28], edx
mov dword [esp], eax
call esi
mov edx, dword [esp + 0x28]
cmp eax, 0x65
jg 0x6d167055
add byte [esp + 0x44], 1
mov eax, 0xcccccccd
mov ecx, edx
mul edx
mov eax, edx
mov edx, ecx
shr eax, 3
lea eax, [eax + eax*4]
add eax, eax
sub edx, eax
movzx eax, byte [edx + 0x6d181e30]
jmp 0x6d16602f
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
mov dword [esp + 8], 0x30
mov dword [esp], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
call sym.libquadmath_0.dll___quadmath_do_pad
cmp esi, eax
jne 0x6d165a9f
add ebx, esi
jmp 0x6d166241
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], 0
xor ecx, ecx
mov dword [esp + 0x38], eax
jmp 0x6d166ada
movzx eax, byte [esp + 0x28]
sub eax, 0x37
movsx eax, al
mov dword [esp + 0x48], eax
jmp 0x6d166533
mov eax, dword [ebp]
jmp 0x6d166670
mov eax, 0x2b
test edx, edx
je 0x6d1667fc
jmp 0x6d166a83
movsx esi, byte [esp + 0x44]
lea eax, [esi - 0x30]
mov dword [esp + 0x48], eax
jmp 0x6d166533
mov edx, dword [esp + 0x14]
mov eax, dword [ebp]
mov dword [esp], 0x20
test edx, edx
mov dword [esp + 4], eax
je 0x6d166c2b
jmp 0x6d166dbb
lea eax, [esp + 0x90]
mov dword [esp + 0x38], eax
jmp 0x6d1664d1
mov eax, ebx
mov ebx, ebp
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0xf0]
add eax, 1
mov byte [esi], al
add word [ebx], 1
jmp 0x6d166ba7
mov esi, ebx
jmp 0x6d166986
mov ecx, ebx
jmp 0x6d166a17
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x6d166f31
jmp 0x6d166e8e
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x6d166e8e
jmp 0x6d166f31
mov esi, dword [esp + 0x20]
test esi, esi
je 0x6d1670b3
lea ecx, [edx - 4]
test ecx, ecx
jle 0x6d1670dc
mov ebx, 0xa
mov eax, ecx
xor edx, edx
div ebx
movzx eax, byte [edx + 0x6d181e30]
mov byte [esp + 0x44], 0x31
jmp 0x6d16602f
cmp esi, 7
jle 0x6d166f31
jmp 0x6d166e7d
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x6d166ce4
jmp 0x6d166e04
mov edx, dword [ebp]
movzx eax, ax
jmp 0x6d166a53
lea ecx, [edx + 4]
mov eax, 0xcccccccd
mul ecx
mov eax, edx
mov edx, ecx
shr eax, 3
lea eax, [eax + eax*4]
add eax, eax
sub edx, eax
movzx eax, byte [edx + 0x6d181e30]
mov byte [esp + 0x44], 0x31
jmp 0x6d16602f
mov ecx, 4
xor ebx, ebx
mov byte [esp + 0x44], 0x31
sub ecx, edx
mov dword [esp + 0x20], ebx
movzx eax, byte [ecx + 0x6d181e30]
mov byte [esp + 0x55], al
jmp 0x6d166ada
cmp dword [esp + 0x34], 0
jne 0x6d1665aa
jmp 0x6d166f31
mov ecx, 1
mov ebx, 1
jmp 0x6d166567
mov ecx, ebx
jmp 0x6d166a23