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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov edx, dword [eax]
lea esi, [ebx + 0x80]
mov eax, dword [esi + 0x50]
push edi
push edx
lea ecx, [ebx + 0x8a4]
mov dword [ebp - 0x1c], edx
push 0xa
push eax
mov dword [ebp - 0x20], eax
mov edi, edx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
call fcn.004f5ac0
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x4c7325
mov eax, dword [esi + 0x50]
sub edi, ecx
mov edx, dword [ebp + 0x10]
dec eax
add eax, edi
lea edi, [ebx + 0x8a4]
mov dword [edx], eax
lea eax, [ecx + 1]
mov ecx, dword [ebp - 8]
mov dword [esi + 0x50], eax
sub eax, ecx
push eax
push ecx
push edi
call fcn.004b5fa0
add esp, 0xc
test eax, eax
jne 0x4c6a52
cmp dword [esi + 0x4c], eax
jne 0x4c6a59
push edi
call fcn.004b6010
add esp, 4
push eax
push edi
call fcn.004b6020
mov edi, dword [ebp + 0xc]
add esp, 4
push eax
push edi
push ebx
call fcn.004c7ab0
add esp, 0x10
cmp eax, 2
jne 0x4c6a5c
push eax
push edi
call fcn.004be9e0
add esp, 8
cmp byte [ebx + 0x6e9], 0
je 0x4c73a2
mov eax, dword [ebp + 0x10]
mov byte [esi + 0xc2], 0
cmp dword [eax], 0
je 0x4c71b7
mov dword [esi + 0x48], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
lea eax, [ebx + 0x8a4]
push eax
call fcn.004b6020
mov edx, eax
add esp, 4
mov dword [ebp - 0xc], edx
mov al, byte [edx]
cmp al, 0xa
je 0x4c6e47
cmp al, 0xd
je 0x4c6e47
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 8], 2
lea eax, [ecx + 1]
mov dword [esi + 0x4c], eax
test ecx, ecx
jne 0x4c6d8e
mov eax, dword [edi + 0x1e0]
mov eax, dword [eax + 0x44]
test al, 3
je 0x4c6c9e
mov al, byte [edx]
mov edi, edx
test al, al
je 0x4c6ac3
cmp al, 0x20
je 0x4c6abb
cmp al, 9
jne 0x4c6ac3
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4c6ab3
push 5
push str.HTTP_
push edi
call fcn.00505fb0
add esp, 0xc
test eax, eax
jne 0x4c6b6d
mov cl, byte [edi + 5]
mov al, cl
cmp al, 0x31
je 0x4c6baf
sub al, 0x32
cmp al, 1
ja 0x4c71d2
mov al, byte [edi + 6]
cmp al, 0x20
je 0x4c6afd
cmp al, 9
jne 0x4c6b6d
movsx eax, cl
mov cl, byte [edi + 7]
sub eax, 0x30
lea edx, [eax + eax*4]
mov al, cl
add edx, edx
sub al, 0x30
mov dword [ebp - 8], edx
cmp al, 9
ja 0x4c6b6d
mov al, byte [edi + 8]
mov byte [ebp - 1], al
sub al, 0x30
cmp al, 9
ja 0x4c6b6d
mov al, byte [edi + 9]
mov byte [ebp - 2], al
sub al, 0x30
cmp al, 9
ja 0x4c6b6d
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, byte [ebp - 1]
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, byte [ebp - 2]
lea ecx, [ecx - 0xa68]
lea ecx, [eax + ecx*2]
mov dword [esi + 0x60], ecx
mov al, byte [edi + 0xa]
cmp al, 0x20
je 0x4c6c46
cmp al, 9
je 0x4c6c46
cmp al, 0xa
jl 0x4c6b6d
cmp al, 0xd
jle 0x4c6c46
lea edi, [ebx + 0x8a4]
push edi
call fcn.004b6010
add esp, 4
push eax
push edi
call fcn.004b6020
add esp, 4
push eax
push ebx
call fcn.004c79f0
add esp, 0xc
cmp eax, 1
jne 0x4c7263
mov edi, dword [ebp + 0xc]
mov dword [esi + 0x60], 0xc8
mov byte [edi + 0x330], 0xa
jmp 0x4c6d75
cmp byte [edi + 6], 0x2e
jne 0x4c723d
mov al, byte [edi + 7]
cmp al, 0x30
je 0x4c6bc8
cmp al, 0x31
jne 0x4c723d
mov cl, byte [edi + 8]
cmp cl, 0x20
je 0x4c6bd9
cmp cl, 9
jne 0x4c723d
mov cl, byte [edi + 9]
movsx edx, al
mov al, cl
sub edx, 0x26
sub al, 0x30
mov dword [ebp - 8], edx
cmp al, 9
ja 0x4c723d
mov al, byte [edi + 0xa]
mov byte [ebp - 2], al
sub al, 0x30
cmp al, 9
ja 0x4c723d
mov al, byte [edi + 0xb]
mov byte [ebp - 1], al
sub al, 0x30
cmp al, 9
ja 0x4c723d
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, byte [ebp - 2]
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, byte [ebp - 1]
lea ecx, [ecx - 0xa68]
lea ecx, [eax + ecx*2]
mov dword [esi + 0x60], ecx
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0x4c6c46
cmp al, 9
je 0x4c6c46
sub al, 0xa
cmp al, 3
ja 0x4c723d
cmp ecx, 0x64
jl 0x4c7223
lea eax, [edx - 0xa]
cmp eax, 1
ja 0x4c71ec
mov edi, dword [ebp + 0xc]
mov al, dl
mov byte [edi + 0x330], dl
cmp dword [esi + 0x7c], 3
jne 0x4c6c85
cmp dl, 0x14
je 0x4c6c85
push str.Lying_server__not_serving_HTTP_2
push ebx
call fcn.004bddc0
mov al, byte [edi + 0x330]
add esp, 8
cmp al, 0x14
jae 0x4c6d75
mov eax, dword [edi + 0x300]
mov dword [eax], 0xffffffff
jmp 0x4c6d75
test eax, 0x40000
je 0x4c7263
mov al, byte [edx]
mov edi, edx
test al, al
je 0x4c6cc1
cmp al, 0x20
je 0x4c6cb9
cmp al, 9
jne 0x4c6cc1
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4c6cb1
push 5
push str.RTSP_
push edi
call fcn.00505fb0
add esp, 0xc
test eax, eax
jne 0x4c7263
mov al, byte [edi + 5]
sub al, 0x30
cmp al, 9
ja 0x4c7257
cmp byte [edi + 6], 0x2e
jne 0x4c7257
mov al, byte [edi + 7]
sub al, 0x30
cmp al, 9
ja 0x4c7257
mov al, byte [edi + 8]
cmp al, 0x20
je 0x4c6d0c
cmp al, 9
jne 0x4c7257
mov cl, byte [edi + 9]
mov al, cl
sub al, 0x30
cmp al, 9
ja 0x4c7257
mov dl, byte [edi + 0xa]
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x4c7257
mov dh, byte [edi + 0xb]
mov al, dh
sub al, 0x30
cmp al, 9
ja 0x4c7257
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dh
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [esi + 0x60], eax
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0x4c6d6b
cmp al, 9
je 0x4c6d6b
sub al, 0xa
cmp al, 3
ja 0x4c7257
mov edi, dword [ebp + 0xc]
mov byte [edi + 0x330], 0xb
push edi
push ebx
call fcn.004c7650
add esp, 8
test eax, eax
jne 0x4c6a52
mov dword [ebp - 8], 6
push ebx
call fcn.004c8320
add esp, 4
test eax, eax
jne 0x4c6a52
push dword [ebp - 0xc]
push edi
push ebx
call fcn.004c5a20
add esp, 0xc
test eax, eax
jne 0x4c6a52
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 8]
push dword [ebp - 0x10]
mov edi, dword [esi + 0x60]
or ebx, 1
cmp byte [eax + 0x6cb], 0
cmove ebx, dword [ebp - 8]
call fcn.004b6010
push eax
push dword [ebp - 0xc]
push 1
push dword [ebp + 8]
call fcn.004bdc70
push dword [ebp - 0x10]
call fcn.004b6010
push eax
push dword [ebp - 0xc]
mov ecx, ebx
lea eax, [edi - 0x64]
or ecx, 0x10
cmp eax, 0x64
cmovae ecx, ebx
mov ebx, dword [ebp + 8]
push ecx
push ebx
call fcn.004bde40
add esp, 0x28
test eax, eax
jne 0x4c6a52
lea edi, [ebx + 0x8a4]
push edi
call fcn.004b6010
add dword [ebx + 0xda8], eax
push edi
adc dword [ebx + 0xdac], 0
call fcn.004b6010
mov edi, dword [ebp + 0xc]
add esp, 8
add dword [ebx + 0xa0], eax
adc dword [ebx + 0xa4], 0
jmp 0x4c716e
mov ecx, dword [esi + 0x60]
lea eax, [ecx - 0x64]
cmp eax, 0x63
ja 0x4c6eb1
sub ecx, 0x64
je 0x4c6e85
sub ecx, 1
je 0x4c6e6f
mov byte [esi + 0xc2], 1
mov dword [esi + 0x4c], 0
jmp 0x4c6f0b
cmp dword [esi + 0x7c], 2
je 0x4c7273
mov byte [esi + 0xc2], 0
jmp 0x4c6f0b
cmp dword [esi + 0x78], 0
mov byte [esi + 0xc2], 1
mov dword [esi + 0x4c], 0
jle 0x4c6f0b
or dword [esi + 0x64], 2
push 0
push ebx
mov dword [esi + 0x78], 0
call fcn.004b0650
add esp, 8
jmp 0x4c6f0b
mov eax, dword [esi]
xor cl, cl
and eax, dword [esi + 4]
mov byte [esi + 0xc2], 0
cmp eax, 0xffffffff
jne 0x4c6f11
cmp byte [esi + 0xc7], cl
jne 0x4c6f11
cmp byte [edi + 0x1c6], cl
jne 0x4c6f11
cmp byte [edi + 0x330], 0xb
jne 0x4c6f11
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40000
jne 0x4c6f11
cmp byte [ebx + 0xccc], 5
je 0x4c6f11
push str.no_chunk__no_close__no_size._Assume_close_to_signal_end
push ebx
call fcn.004bddc0
push 2
push edi
call fcn.004be9e0
add esp, 0x10
mov cl, byte [esi + 0xc2]
test cl, cl
jne 0x4c6f26
push ebx
call fcn.004c7580
add esp, 4
test eax, eax
jne 0x4c6a52
cmp byte [edi + 0x1c6], 0
je 0x4c6f6c
mov eax, dword [ebx + 0xe0]
cmp eax, 0x191
jne 0x4c6f47
cmp dword [edi + 0x218], 2
je 0x4c6f57
jmp 0x4c6f6c
cmp eax, 0x197
jne 0x4c6f6c
cmp dword [edi + 0x21c], 2
jne 0x4c6f6c
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push ebx
call fcn.004bddc0
add esp, 8
mov byte [ebx + 0xd75], 1
mov eax, dword [esi + 0x60]
sub eax, 0x64
cmp eax, 0x64
sbb edi, edi
xor eax, eax
and edi, 0x10
cmp byte [ebx + 0x6cb], al
setne al
add eax, 2
or edi, eax
lea eax, [ebx + 0x8a4]
push eax
call fcn.004b6010
add esp, 4
mov dword [ebp - 0xc], eax
push eax
lea eax, [ebx + 0x8a4]
push eax
call fcn.004b6020
add esp, 4
push eax
push edi
push ebx
call fcn.004bde40
add esp, 0x10
test eax, eax
jne 0x4c6a52
mov eax, dword [ebp - 0xc]
cdq
mov edi, eax
mov eax, edx
add dword [ebx + 0xda8], edi
push ebx
adc dword [ebx + 0xdac], eax
add edi, dword [ebx + 0xa0]
mov dword [ebx + 0xa0], edi
adc eax, dword [ebx + 0xa4]
mov dword [ebp - 0x14], eax
mov dword [ebx + 0xa4], eax
call fcn.004c7ef0
add esp, 4
test al, al
mov eax, dword [esi + 0x60]
jne 0x4c730a
add eax, 0xffffff9c
cmp eax, 0x63
ja 0x4c700f
mov eax, dword [ebp - 0x14]
jmp 0x4c701d
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
push ebx
mov dword [ebx + 0xa8], edi
mov dword [ebx + 0xac], eax
call fcn.004c4a50
add esp, 4
test eax, eax
jne 0x4c6a52
cmp dword [esi + 0x60], 0x12c
mov edi, dword [ebp + 0xc]
jl 0x4c7161
cmp byte [edi + 0x1d0], al
jne 0x4c713d
cmp byte [edi + 0x1c6], al
jne 0x4c713d
cmp byte [ebx + 0xd83], al
jne 0x4c7146
mov al, byte [ebx + 0xccc]
dec al
cmp al, 3
ja 0x4c713d
push 0
push ebx
call fcn.004b0650
add esp, 8
cmp byte [esi + 0xc4], 0
jne 0x4c713d
cmp dword [esi + 0x60], 0x1a1
jne 0x4c70d8
cmp byte [ebx + 0xd77], 0
je 0x4c70d8
push str.Got_417_while_waiting_for_a_100
push ebx
call fcn.004bddc0
push dword [ebx + 0xcd0]
mov byte [ebx + 0xd78], 1
call dword [0x5470a4]
push esi
push ebx
mov dword [ebx + 0x118], eax
call fcn.004c92f0
add esp, 0x14
jmp 0x4c713d
cmp byte [ebx + 0x6c7], 0
je 0x4c7102
push str.HTTP_error_before_end_of_send__keep_sending
push ebx
call fcn.004bddc0
add esp, 8
cmp dword [esi + 0x78], 0
jle 0x4c713d
or dword [esi + 0x64], 2
mov dword [esi + 0x78], 0
jmp 0x4c713d
push str.HTTP_error_before_end_of_send__stop_sending
push ebx
call fcn.004bddc0
push 2
push edi
call fcn.004be9e0
push esi
push ebx
call fcn.004c92f0
add esp, 0x18
test eax, eax
jne 0x4c6a52
mov byte [esi + 0xc4], 1
cmp byte [ebx + 0xd77], al
je 0x4c713d
mov dword [esi + 0x78], 3
cmp byte [ebx + 0xd83], 0
je 0x4c7161
cmp dword [edi + 0x1fc], 0xffffffff
je 0x4c7161
push str.Keep_sending_data_to_get_tossed_away
push ebx
call fcn.004bddc0
add esp, 8
or dword [esi + 0x64], 2
cmp byte [esi + 0xc2], 0
je 0x4c72a2
lea eax, [ebx + 0x8a4]
push eax
call fcn.004b6030
mov eax, dword [esi + 0x50]
add esp, 4
cmp byte [eax], 0
je 0x4c6a50
mov ecx, eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov eax, dword [eax]
push eax
push 0xa
push ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.004f5ac0
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x4c7328
mov edi, dword [ebp - 0x14]
jmp 0x4c69c7
mov ecx, dword [ebp - 0x1c]
mov dword [esi + 0x48], 2
mov dword [eax], ecx
mov eax, dword [ebp - 0x20]
pop edi
mov dword [esi + 0x50], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unsupported_HTTP_version_in_response
push ebx
call fcn.004bdd00
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x66666667
imul edx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [ebp - 8]
lea eax, [ecx + ecx*4]
add eax, eax
sub edx, eax
push edx
push ecx
push str.Unsupported_HTTP_version___u._d__in_response
push ebx
call fcn.004bdd00
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unsupported_response_code_in_HTTP_response
push ebx
call fcn.004bdd00
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unsupported_HTTP_1_subversion_in_response
push ebx
call fcn.004bdd00
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 8
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov byte [esi + 0xc2], 0
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Received_101__Switching_to_HTTP_2
push ebx
call fcn.004bddc0
add esp, 8
mov dword [esi + 0x7c], 3
mov byte [esi + 0xc2], 1
mov eax, 1
mov dword [esi + 0x4c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x14c], 0
mov ecx, dword [ebp + 0x14]
jne 0x4c72d3
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40000
je 0x4c72d6
cmp dword [ebx + 0x65c], 2
jne 0x4c72d6
cmp dword [esi + 4], 0xffffffff
jg 0x4c72d6
jl 0x4c72d3
cmp dword [esi], 0xffffffff
ja 0x4c72d6
mov byte [ecx], 1
cmp dword [esi + 8], 0
jne 0x4c72e7
cmp dword [esi + 0xc], 0
jne 0x4c72e7
mov byte [ecx], 1
jmp 0x4c72ec
cmp byte [ecx], 0
je 0x4c72f0
and dword [esi + 0x64], 0xfffffffe
push dword [ebp - 0xc]
push dword [ebp - 8]
push 1
push ebx
call fcn.004bdc70
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push str.The_requested_URL_returned_error:__d
push ebx
call fcn.004bdd00
add esp, 0xc
mov eax, 0x16
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
push dword [ebp - 0xc]
lea eax, [ebx + 0x8a4]
push dword [ebp - 8]
push eax
call fcn.004b5fa0
add esp, 0xc
test eax, eax
jne 0x4c6a52
cmp dword [esi + 0x4c], eax
jne 0x4c6a50
lea eax, [ebx + 0x8a4]
push eax
call fcn.004b6010
add esp, 4
push eax
lea eax, [ebx + 0x8a4]
push eax
call fcn.004b6020
add esp, 4
push eax
push edi
push ebx
call fcn.004c7ab0
add esp, 0x10
cmp eax, 2
jne 0x4c6a50
push eax
push edi
mov byte [esi + 0xc2], 0
mov dword [esi + 0x48], eax
call fcn.004be9e0
add esp, 8
cmp byte [ebx + 0x6e9], 0
jne 0x4c6a50
push str.Received_HTTP_0.9_when_not_allowed
push ebx
call fcn.004bdd00
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret