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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ecx, dword [eax]
lea ebx, [esi + 0x80]
push edi
mov edi, dword [ebx + 0x50]
mov dword [ebp - 0x14], ecx
mov dword [ebp + 8], edi
mov dword [ebp - 0x18], edi
push dword [eax]
push 0xa
push edi
call fcn.00579b90
add esp, 0xc
test eax, eax
je 0x51bc5c
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebp + 0x10]
sub ecx, eax
dec ecx
inc eax
add dword [edx], ecx
lea ecx, [esi + 0x8a4]
mov dword [ebx + 0x50], eax
sub eax, edi
push eax
push edi
push ecx
call fcn.00506d00
add esp, 0xc
test eax, eax
jne 0x51bae5
cmp dword [ebx + 0x4c], eax
jne 0x51b26b
lea edi, [esi + 0x8a4]
push edi
call fcn.00506d70
push edi
mov dword [ebp - 8], eax
call fcn.00506d80
mov edi, dword [ebp + 0xc]
add esp, 8
mov edx, eax
mov ecx, dword [edi + 0x1e0]
test dword [ecx + 0x44], 0x40000
je 0x51b255
mov eax, dword [ebp - 8]
mov ecx, 5
cmp eax, 5
sbb edi, edi
inc edi
cmp eax, 5
cmova eax, ecx
push eax
push edx
push str.RTSP_
call sym.Setup.exe_curl_strnequal
add esp, 0xc
test eax, eax
mov eax, 2
cmovne eax, edi
mov edi, dword [ebp + 0xc]
jmp 0x51b262
push dword [ebp - 8]
push edx
push esi
call fcn.0051c2f0
add esp, 0xc
cmp eax, 2
je 0x51bab5
lea eax, [esi + 0x8a4]
push eax
call fcn.00506d80
mov edx, eax
add esp, 4
mov dword [ebp - 8], edx
mov cl, byte [edx]
cmp cl, 0xa
je 0x51b6ab
cmp cl, 0xd
je 0x51b6ab
mov ecx, dword [ebx + 0x4c]
mov dword [ebp + 8], 2
lea eax, [ecx + 1]
mov dword [ebx + 0x4c], eax
test ecx, ecx
jne 0x51b5e2
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1e0]
mov eax, dword [eax + 0x44]
test al, 3
je 0x51b4cc
mov al, byte [edx]
mov edi, edx
test al, al
je 0x51b2d7
cmp al, 0x20
je 0x51b2cf
cmp al, 9
jne 0x51b2d7
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x51b2c7
push 5
push str.HTTP_
push edi
call fcn.005923f0
add esp, 0xc
test eax, eax
jne 0x51b386
mov cl, byte [edi + 5]
mov al, cl
cmp al, 0x31
je 0x51b3c8
sub al, 0x32
cmp al, 1
ja 0x51bb07
mov al, byte [edi + 6]
cmp al, 0x20
je 0x51b311
cmp al, 9
jne 0x51b386
movsx eax, cl
mov cl, byte [edi + 7]
sub eax, 0x30
lea edx, [eax + eax*4]
add edx, edx
mov dword [ebp - 0x10], edx
cmp cl, 0x30
jl 0x51b386
cmp cl, 0x39
jg 0x51b386
mov al, byte [edi + 8]
mov byte [ebp + 0xb], al
cmp al, 0x30
jl 0x51b386
cmp al, 0x39
jg 0x51b386
mov al, byte [edi + 9]
mov byte [ebp - 1], al
cmp al, 0x30
jl 0x51b386
cmp al, 0x39
jg 0x51b386
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, byte [ebp + 0xb]
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, byte [ebp - 1]
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [ebx + 0x60], eax
mov al, byte [edi + 0xa]
cmp al, 0x20
je 0x51b476
cmp al, 9
je 0x51b476
cmp al, 0xa
jl 0x51b386
cmp al, 0xd
jle 0x51b476
lea edi, [esi + 0x8a4]
push edi
call fcn.00506d70
add esp, 4
push eax
push edi
call fcn.00506d80
add esp, 4
push eax
push esi
call fcn.0051c2f0
add esp, 0xc
cmp eax, 1
jne 0x51bb98
mov edi, dword [ebp + 0xc]
mov dword [ebx + 0x60], 0xc8
mov byte [edi + 0x451], 0xa
jmp 0x51b5c6
cmp byte [edi + 6], 0x2e
jne 0x51bb72
mov al, byte [edi + 7]
cmp al, 0x30
je 0x51b3e1
cmp al, 0x31
jne 0x51bb72
mov cl, byte [edi + 8]
cmp cl, 0x20
je 0x51b3f2
cmp cl, 9
jne 0x51bb72
mov cl, byte [edi + 9]
movsx edx, al
sub edx, 0x26
mov dword [ebp - 0x10], edx
cmp cl, 0x30
jl 0x51bb72
cmp cl, 0x39
jg 0x51bb72
mov al, byte [edi + 0xa]
mov byte [ebp + 0xb], al
cmp al, 0x30
jl 0x51bb72
cmp al, 0x39
jg 0x51bb72
mov al, byte [edi + 0xb]
mov byte [ebp - 1], al
cmp al, 0x30
jl 0x51bb72
cmp al, 0x39
jg 0x51bb72
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, byte [ebp + 0xb]
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, byte [ebp - 1]
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [ebx + 0x60], eax
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0x51b476
cmp al, 9
je 0x51b476
cmp al, 0xa
jl 0x51bb72
cmp al, 0xd
jg 0x51bb72
cmp dword [ebx + 0x60], 0x64
jl 0x51bb58
lea eax, [edx - 0xa]
cmp eax, 1
ja 0x51bb21
mov edi, dword [ebp + 0xc]
mov byte [edi + 0x451], dl
cmp dword [ebx + 0x7c], 3
jne 0x51b4ae
cmp dl, 0x14
je 0x51b4ae
push str.Lying_server__not_serving_HTTP_2
push esi
call fcn.00511de0
add esp, 8
cmp byte [edi + 0x451], 0x14
jae 0x51b5c6
mov eax, dword [edi + 0x420]
mov dword [eax], 0xffffffff
jmp 0x51b5c6
test eax, 0x40000
je 0x51bb98
mov al, byte [edx]
mov edi, edx
test al, al
je 0x51b4f0
nop
cmp al, 0x20
je 0x51b4e8
cmp al, 9
jne 0x51b4f0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x51b4e0
push 5
push str.RTSP_
push edi
call fcn.005923f0
add esp, 0xc
test eax, eax
jne 0x51bb98
mov al, byte [edi + 5]
cmp al, 0x30
jl 0x51bb8c
cmp al, 0x39
jg 0x51bb8c
cmp byte [edi + 6], 0x2e
jne 0x51bb8c
mov al, byte [edi + 7]
cmp al, 0x30
jl 0x51bb8c
cmp al, 0x39
jg 0x51bb8c
mov al, byte [edi + 8]
cmp al, 0x20
je 0x51b547
cmp al, 9
jne 0x51bb8c
mov al, byte [edi + 9]
cmp al, 0x30
jl 0x51bb8c
cmp al, 0x39
jg 0x51bb8c
mov dh, byte [edi + 0xa]
cmp dh, 0x30
jl 0x51bb8c
cmp dh, 0x39
jg 0x51bb8c
mov dl, byte [edi + 0xb]
cmp dl, 0x30
jl 0x51bb8c
cmp dl, 0x39
jg 0x51bb8c
movsx eax, al
lea ecx, [eax + eax*4]
movsx eax, dh
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [ebx + 0x60], eax
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0x51b5bc
cmp al, 9
je 0x51b5bc
cmp al, 0xa
jl 0x51bb8c
cmp al, 0xd
jg 0x51bb8c
mov edi, dword [ebp + 0xc]
mov byte [edi + 0x451], 0xb
push edi
push esi
call fcn.0051bf90
add esp, 8
test eax, eax
jne 0x51bae5
mov ebx, 6
mov dword [ebp + 8], ebx
jmp 0x51b5ea
mov edi, dword [ebp + 0xc]
mov ebx, 2
push esi
call fcn.0051ccb0
add esp, 4
test eax, eax
jne 0x51bae5
push dword [ebp - 8]
push edi
push esi
call fcn.0051a0a0
add esp, 0xc
test eax, eax
jne 0x51bae5
mov edi, dword [esi + 0xe0]
or ebx, 1
cmp byte [esi + 0x6cb], al
lea eax, [esi + 0x8a4]
push eax
cmove ebx, dword [ebp + 8]
call fcn.00506d70
push eax
push dword [ebp - 8]
push 1
push esi
call fcn.00511c90
lea eax, [esi + 0x8a4]
push eax
call fcn.00506d70
push eax
push dword [ebp - 8]
lea eax, [edi - 0x64]
mov ecx, ebx
or ecx, 0x10
cmp eax, 0x64
cmovae ecx, ebx
push ecx
push esi
call fcn.00511e60
add esp, 0x28
test eax, eax
jne 0x51bae5
lea ebx, [esi + 0x8a4]
push ebx
call fcn.00506d70
add dword [esi + 0xd88], eax
push ebx
adc dword [esi + 0xd8c], 0
call fcn.00506d70
add dword [esi + 0xa0], eax
push ebx
adc dword [esi + 0xa4], 0
call fcn.00506d90
add esp, 0xc
lea ebx, [esi + 0x80]
jmp 0x51baa2
mov eax, dword [ebx + 0x60]
cmp eax, 0x64
jl 0x51b8ba
cmp eax, 0xc7
jg 0x51b8ba
sub eax, 0x64
je 0x51b887
sub eax, 1
je 0x51b871
mov byte [ebx + 0xc2], 1
mov dword [ebx + 0x4c], 0
mov edi, dword [ebp + 0xc]
cmp byte [ebx + 0xc2], 0
jne 0x51b6ff
push esi
call fcn.0051bec0
add esp, 4
test eax, eax
jne 0x51bae5
cmp byte [edi + 0x1c6], 0
je 0x51b78b
mov eax, dword [esi + 0xe0]
cmp eax, 0x191
jne 0x51b722
cmp dword [edi + 0x250], 2
je 0x51b732
cmp eax, 0x197
jne 0x51b747
cmp dword [edi + 0x254], 2
jne 0x51b747
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push esi
call fcn.00511de0
add esp, 8
mov byte [esi + 0xd55], 1
cmp byte [edi + 0x1c6], 0
je 0x51b78b
mov eax, dword [esi + 0xe0]
cmp eax, 0x191
jne 0x51b766
cmp dword [edi + 0x2d8], 1
je 0x51b776
cmp eax, 0x197
jne 0x51b78b
cmp dword [edi + 0x2dc], 1
jne 0x51b78b
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push esi
call fcn.00511de0
add esp, 8
mov byte [esi + 0xd55], 1
cmp dword [edi + 0x2d8], 3
jne 0x51b7aa
cmp dword [esi + 0xe0], 0x191
je 0x51b7aa
mov dword [edi + 0x2d8], 4
cmp dword [edi + 0x2dc], 3
jne 0x51b7c9
cmp dword [esi + 0xe0], 0x197
je 0x51b7c9
mov dword [edi + 0x2dc], 4
mov eax, dword [ebx + 0x60]
sub eax, 0x64
cmp eax, 0x64
sbb edi, edi
xor eax, eax
and edi, 0x10
cmp byte [esi + 0x6cb], al
setne al
add eax, 2
or edi, eax
lea eax, [esi + 0x8a4]
push eax
call fcn.00506d70
add esp, 4
mov dword [ebp - 0x10], eax
push eax
lea eax, [esi + 0x8a4]
push eax
call fcn.00506d80
add esp, 4
push eax
push edi
push esi
call fcn.00511e60
add esp, 0x10
test eax, eax
jne 0x51bae5
mov eax, dword [ebp - 0x10]
cdq
add dword [esi + 0xd88], eax
push esi
adc dword [esi + 0xd8c], edx
add dword [esi + 0xa0], eax
adc dword [esi + 0xa4], edx
call fcn.0051c890
add esp, 4
test al, al
jne 0x51bc3f
mov eax, dword [ebx + 0x60]
cmp eax, 0x64
jl 0x51b934
cmp eax, 0xc7
jg 0x51b934
mov eax, dword [esi + 0xa0]
mov ecx, dword [esi + 0xa4]
jmp 0x51b942
cmp dword [ebx + 0x7c], 2
je 0x51bba8
mov byte [ebx + 0xc2], 0
jmp 0x51b6e2
cmp dword [ebx + 0x78], 0
mov byte [ebx + 0xc2], 1
mov dword [ebx + 0x4c], 0
jle 0x51b6e2
or dword [ebx + 0x64], 2
push 0
push esi
mov dword [ebx + 0x78], 0
call fcn.00500820
add esp, 8
jmp 0x51b6e2
mov eax, dword [ebx]
and eax, dword [ebx + 4]
mov byte [ebx + 0xc2], 0
cmp eax, 0xffffffff
jne 0x51b6e2
cmp byte [ebx + 0xc7], 0
mov edi, dword [ebp + 0xc]
jne 0x51b6e5
cmp byte [edi + 0x1c6], 0
jne 0x51b6e5
cmp byte [edi + 0x451], 0xb
jne 0x51b6e5
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40000
jne 0x51b6e5
cmp byte [esi + 0xd4e], 5
je 0x51b6e5
push str.no_chunk__no_close__no_size._Assume_close_to_signal_end
push esi
call fcn.00511de0
push 2
push edi
call fcn.005129c0
add esp, 0x10
jmp 0x51b6e5
xorps xmm0, xmm0
movlpd qword [ebp - 0xc], xmm0
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
push esi
mov dword [esi + 0xa8], eax
mov dword [esi + 0xac], ecx
call fcn.00519090
add esp, 4
test eax, eax
jne 0x51bae5
cmp dword [ebx + 0x60], 0x12c
mov edi, dword [ebp + 0xc]
jl 0x51ba86
cmp byte [edi + 0x1d0], al
jne 0x51ba62
cmp byte [edi + 0x1c6], al
jne 0x51ba62
cmp byte [esi + 0xd63], al
jne 0x51ba6b
mov al, byte [esi + 0xd4e]
dec al
cmp al, 3
ja 0x51ba62
push 0
push esi
call fcn.00500820
add esp, 8
cmp byte [ebx + 0xc4], 0
jne 0x51ba62
cmp dword [ebx + 0x60], 0x1a1
jne 0x51b9fd
cmp byte [esi + 0xd57], 0
je 0x51b9fd
push str.Got_417_while_waiting_for_a_100
push esi
call fcn.00511de0
push dword [esi + 0xcac]
mov byte [esi + 0xd58], 1
call dword [0x63f150]
push ebx
push esi
mov dword [esi + 0x118], eax
call fcn.0051dc50
add esp, 0x14
jmp 0x51ba62
cmp byte [esi + 0x6c7], 0
je 0x51ba27
push str.HTTP_error_before_end_of_send__keep_sending
push esi
call fcn.00511de0
add esp, 8
cmp dword [ebx + 0x78], 0
jle 0x51ba62
or dword [ebx + 0x64], 2
mov dword [ebx + 0x78], 0
jmp 0x51ba62
push str.HTTP_error_before_end_of_send__stop_sending
push esi
call fcn.00511de0
push 2
push edi
call fcn.005129c0
push ebx
push esi
call fcn.0051dc50
add esp, 0x18
test eax, eax
jne 0x51bae5
mov byte [ebx + 0xc4], 1
cmp byte [esi + 0xd57], al
je 0x51ba62
mov dword [ebx + 0x78], 3
cmp byte [esi + 0xd63], 0
je 0x51ba86
cmp dword [edi + 0x1fc], 0xffffffff
je 0x51ba86
push str.Keep_sending_data_to_get_tossed_away
push esi
call fcn.00511de0
add esp, 8
or dword [ebx + 0x64], 2
cmp byte [ebx + 0xc2], 0
je 0x51bbd7
lea eax, [esi + 0x8a4]
push eax
call fcn.00506d90
add esp, 4
mov edi, dword [ebx + 0x50]
mov dword [ebp + 8], edi
cmp byte [edi], 0
je 0x51bae3
mov eax, dword [ebp + 0x10]
jmp 0x51b1b3
push 2
push edi
call fcn.005129c0
add esp, 8
cmp byte [esi + 0x6e9], 0
je 0x51bccf
mov eax, dword [ebp + 0x10]
mov byte [ebx + 0xc2], 0
cmp dword [eax], 0
je 0x51baec
mov dword [ebx + 0x48], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0x48], 2
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
pop edi
mov dword [ebx + 0x50], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Unsupported_HTTP_version_in_response
push esi
call fcn.00511d20
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 - 0x10]
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 esi
call fcn.00511d20
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 esi
call fcn.00511d20
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 esi
call fcn.00511d20
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
pop esi
mov byte [ebx + 0xc2], 0
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push str.Received_101__Switching_to_HTTP_2
push esi
call fcn.00511de0
add esp, 8
mov dword [ebx + 0x7c], 3
mov byte [ebx + 0xc2], 1
mov eax, 1
mov dword [ebx + 0x4c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x14c], 0
mov ecx, dword [ebp + 0x14]
jne 0x51bc08
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40000
je 0x51bc0b
cmp dword [esi + 0x65c], 2
jne 0x51bc0b
cmp dword [ebx + 4], 0xffffffff
jg 0x51bc0b
jl 0x51bc08
cmp dword [ebx], 0xffffffff
ja 0x51bc0b
mov byte [ecx], 1
cmp dword [ebx + 8], 0
jne 0x51bc1c
cmp dword [ebx + 0xc], 0
jne 0x51bc1c
mov byte [ecx], 1
jmp 0x51bc21
cmp byte [ecx], 0
je 0x51bc25
and dword [ebx + 0x64], 0xfffffffe
push dword [ebp - 0x10]
push dword [ebp + 8]
push 1
push esi
call fcn.00511c90
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebx + 0x60]
push str.The_requested_URL_returned_error:__d
push esi
call fcn.00511d20
add esp, 0xc
mov eax, 0x16
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
lea edi, [esi + 0x8a4]
push dword [eax]
push dword [ebp + 8]
push edi
call fcn.00506d00
add esp, 0xc
test eax, eax
jne 0x51bae5
cmp dword [ebx + 0x4c], eax
jne 0x51bae3
push edi
call fcn.00506d70
add esp, 4
push eax
push edi
call fcn.00506d80
mov edi, dword [ebp + 0xc]
add esp, 4
push eax
push edi
push esi
call fcn.0051c3a0
add esp, 0x10
cmp eax, 2
jne 0x51bae3
push eax
push edi
mov byte [ebx + 0xc2], 0
mov dword [ebx + 0x48], eax
call fcn.005129c0
add esp, 8
cmp byte [esi + 0x6e9], 0
jne 0x51bae3
push str.Received_HTTP_0.9_when_not_allowed
push esi
call fcn.00511d20
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret