Function at 0x517ca0
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.00576680
add esp, 0xc
test eax, eax
je 0x51876c
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.00503810
add esp, 0xc
test eax, eax
jne 0x5185f5
cmp dword [ebx + 0x4c], eax
jne 0x517d7b
lea edi, [esi + 0x8a4]
push edi
call fcn.00503880
push edi
mov dword [ebp - 8], eax
call fcn.00503940
mov edi, dword [ebp + 0xc]
add esp, 8
mov edx, eax
mov ecx, dword [edi + 0x1e0]
test dword [ecx + 0x44], 0x40000
je 0x517d65
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 0x517d72
push dword [ebp - 8]
push edx
push esi
call fcn.00518e00
add esp, 0xc
cmp eax, 2
je 0x5185c5
lea eax, [esi + 0x8a4]
push eax
call fcn.00503940
mov edx, eax
add esp, 4
mov dword [ebp - 8], edx
mov cl, byte [edx]
cmp cl, 0xa
je 0x5181bb
cmp cl, 0xd
je 0x5181bb
mov ecx, dword [ebx + 0x4c]
mov dword [ebp + 8], 2
lea eax, [ecx + 1]
mov dword [ebx + 0x4c], eax
test ecx, ecx
jne 0x5180f2
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1e0]
mov eax, dword [eax + 0x44]
test al, 3
je 0x517fdc
mov al, byte [edx]
mov edi, edx
test al, al
je 0x517de7
cmp al, 0x20
je 0x517ddf
cmp al, 9
jne 0x517de7
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x517dd7
push 5
push str.HTTP_
push edi
call fcn.0058ee30
add esp, 0xc
test eax, eax
jne 0x517e96
mov cl, byte [edi + 5]
mov al, cl
cmp al, 0x31
je 0x517ed8
sub al, 0x32
cmp al, 1
ja 0x518617
mov al, byte [edi + 6]
cmp al, 0x20
je 0x517e21
cmp al, 9
jne 0x517e96
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 0x517e96
cmp cl, 0x39
jg 0x517e96
mov al, byte [edi + 8]
mov byte [ebp + 0xb], al
cmp al, 0x30
jl 0x517e96
cmp al, 0x39
jg 0x517e96
mov al, byte [edi + 9]
mov byte [ebp - 1], al
cmp al, 0x30
jl 0x517e96
cmp al, 0x39
jg 0x517e96
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 0x517f86
cmp al, 9
je 0x517f86
cmp al, 0xa
jl 0x517e96
cmp al, 0xd
jle 0x517f86
lea edi, [esi + 0x8a4]
push edi
call fcn.00503880
add esp, 4
push eax
push edi
call fcn.00503940
add esp, 4
push eax
push esi
call fcn.00518e00
add esp, 0xc
cmp eax, 1
jne 0x5186a8
mov edi, dword [ebp + 0xc]
mov dword [ebx + 0x60], 0xc8
mov byte [edi + 0x451], 0xa
jmp 0x5180d6
cmp byte [edi + 6], 0x2e
jne 0x518682
mov al, byte [edi + 7]
cmp al, 0x30
je 0x517ef1
cmp al, 0x31
jne 0x518682
mov cl, byte [edi + 8]
cmp cl, 0x20
je 0x517f02
cmp cl, 9
jne 0x518682
mov cl, byte [edi + 9]
movsx edx, al
sub edx, 0x26
mov dword [ebp - 0x10], edx
cmp cl, 0x30
jl 0x518682
cmp cl, 0x39
jg 0x518682
mov al, byte [edi + 0xa]
mov byte [ebp + 0xb], al
cmp al, 0x30
jl 0x518682
cmp al, 0x39
jg 0x518682
mov al, byte [edi + 0xb]
mov byte [ebp - 1], al
cmp al, 0x30
jl 0x518682
cmp al, 0x39
jg 0x518682
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 0x517f86
cmp al, 9
je 0x517f86
cmp al, 0xa
jl 0x518682
cmp al, 0xd
jg 0x518682
cmp dword [ebx + 0x60], 0x64
jl 0x518668
lea eax, [edx - 0xa]
cmp eax, 1
ja 0x518631
mov edi, dword [ebp + 0xc]
mov byte [edi + 0x451], dl
cmp dword [ebx + 0x7c], 3
jne 0x517fbe
cmp dl, 0x14
je 0x517fbe
push str.Lying_server__not_serving_HTTP_2
push esi
call fcn.0050e8f0
add esp, 8
cmp byte [edi + 0x451], 0x14
jae 0x5180d6
mov eax, dword [edi + 0x420]
mov dword [eax], 0xffffffff
jmp 0x5180d6
test eax, 0x40000
je 0x5186a8
mov al, byte [edx]
mov edi, edx
test al, al
je 0x518000
nop
cmp al, 0x20
je 0x517ff8
cmp al, 9
jne 0x518000
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x517ff0
push 5
push str.RTSP_
push edi
call fcn.0058ee30
add esp, 0xc
test eax, eax
jne 0x5186a8
mov al, byte [edi + 5]
cmp al, 0x30
jl 0x51869c
cmp al, 0x39
jg 0x51869c
cmp byte [edi + 6], 0x2e
jne 0x51869c
mov al, byte [edi + 7]
cmp al, 0x30
jl 0x51869c
cmp al, 0x39
jg 0x51869c
mov al, byte [edi + 8]
cmp al, 0x20
je 0x518057
cmp al, 9
jne 0x51869c
mov al, byte [edi + 9]
cmp al, 0x30
jl 0x51869c
cmp al, 0x39
jg 0x51869c
mov dh, byte [edi + 0xa]
cmp dh, 0x30
jl 0x51869c
cmp dh, 0x39
jg 0x51869c
mov dl, byte [edi + 0xb]
cmp dl, 0x30
jl 0x51869c
cmp dl, 0x39
jg 0x51869c
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 0x5180cc
cmp al, 9
je 0x5180cc
cmp al, 0xa
jl 0x51869c
cmp al, 0xd
jg 0x51869c
mov edi, dword [ebp + 0xc]
mov byte [edi + 0x451], 0xb
push edi
push esi
call fcn.00518aa0
add esp, 8
test eax, eax
jne 0x5185f5
mov ebx, 6
mov dword [ebp + 8], ebx
jmp 0x5180fa
mov edi, dword [ebp + 0xc]
mov ebx, 2
push esi
call fcn.005197c0
add esp, 4
test eax, eax
jne 0x5185f5
push dword [ebp - 8]
push edi
push esi
call fcn.00516bb0
add esp, 0xc
test eax, eax
jne 0x5185f5
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.00503880
push eax
push dword [ebp - 8]
push 1
push esi
call fcn.0050e7a0
lea eax, [esi + 0x8a4]
push eax
call fcn.00503880
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.0050e970
add esp, 0x28
test eax, eax
jne 0x5185f5
lea ebx, [esi + 0x8a4]
push ebx
call fcn.00503880
add dword [esi + 0xd88], eax
push ebx
adc dword [esi + 0xd8c], 0
call fcn.00503880
add dword [esi + 0xa0], eax
push ebx
adc dword [esi + 0xa4], 0
call fcn.00503890
add esp, 0xc
lea ebx, [esi + 0x80]
jmp 0x5185b2
mov eax, dword [ebx + 0x60]
cmp eax, 0x64
jl 0x5183ca
cmp eax, 0xc7
jg 0x5183ca
sub eax, 0x64
je 0x518397
sub eax, 1
je 0x518381
mov byte [ebx + 0xc2], 1
mov dword [ebx + 0x4c], 0
mov edi, dword [ebp + 0xc]
cmp byte [ebx + 0xc2], 0
jne 0x51820f
push esi
call fcn.005189d0
add esp, 4
test eax, eax
jne 0x5185f5
cmp byte [edi + 0x1c6], 0
je 0x51829b
mov eax, dword [esi + 0xe0]
cmp eax, 0x191
jne 0x518232
cmp dword [edi + 0x250], 2
je 0x518242
cmp eax, 0x197
jne 0x518257
cmp dword [edi + 0x254], 2
jne 0x518257
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push esi
call fcn.0050e8f0
add esp, 8
mov byte [esi + 0xd55], 1
cmp byte [edi + 0x1c6], 0
je 0x51829b
mov eax, dword [esi + 0xe0]
cmp eax, 0x191
jne 0x518276
cmp dword [edi + 0x2d8], 1
je 0x518286
cmp eax, 0x197
jne 0x51829b
cmp dword [edi + 0x2dc], 1
jne 0x51829b
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push esi
call fcn.0050e8f0
add esp, 8
mov byte [esi + 0xd55], 1
cmp dword [edi + 0x2d8], 3
jne 0x5182ba
cmp dword [esi + 0xe0], 0x191
je 0x5182ba
mov dword [edi + 0x2d8], 4
cmp dword [edi + 0x2dc], 3
jne 0x5182d9
cmp dword [esi + 0xe0], 0x197
je 0x5182d9
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.00503880
add esp, 4
mov dword [ebp - 0x10], eax
push eax
lea eax, [esi + 0x8a4]
push eax
call fcn.00503940
add esp, 4
push eax
push edi
push esi
call fcn.0050e970
add esp, 0x10
test eax, eax
jne 0x5185f5
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.005193a0
add esp, 4
test al, al
jne 0x51874f
mov eax, dword [ebx + 0x60]
cmp eax, 0x64
jl 0x518444
cmp eax, 0xc7
jg 0x518444
mov eax, dword [esi + 0xa0]
mov ecx, dword [esi + 0xa4]
jmp 0x518452
cmp dword [ebx + 0x7c], 2
je 0x5186b8
mov byte [ebx + 0xc2], 0
jmp 0x5181f2
cmp dword [ebx + 0x78], 0
mov byte [ebx + 0xc2], 1
mov dword [ebx + 0x4c], 0
jle 0x5181f2
or dword [ebx + 0x64], 2
push 0
push esi
mov dword [ebx + 0x78], 0
call fcn.004fd320
add esp, 8
jmp 0x5181f2
mov eax, dword [ebx]
and eax, dword [ebx + 4]
mov byte [ebx + 0xc2], 0
cmp eax, 0xffffffff
jne 0x5181f2
cmp byte [ebx + 0xc7], 0
mov edi, dword [ebp + 0xc]
jne 0x5181f5
cmp byte [edi + 0x1c6], 0
jne 0x5181f5
cmp byte [edi + 0x451], 0xb
jne 0x5181f5
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40000
jne 0x5181f5
cmp byte [esi + 0xd4e], 5
je 0x5181f5
push str.no_chunk__no_close__no_size._Assume_close_to_signal_end
push esi
call fcn.0050e8f0
push 2
push edi
call fcn.0050f4f0
add esp, 0x10
jmp 0x5181f5
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.00515ba0
add esp, 4
test eax, eax
jne 0x5185f5
cmp dword [ebx + 0x60], 0x12c
mov edi, dword [ebp + 0xc]
jl 0x518596
cmp byte [edi + 0x1d0], al
jne 0x518572
cmp byte [edi + 0x1c6], al
jne 0x518572
cmp byte [esi + 0xd63], al
jne 0x51857b
mov al, byte [esi + 0xd4e]
dec al
cmp al, 3
ja 0x518572
push 0
push esi
call fcn.004fd320
add esp, 8
cmp byte [ebx + 0xc4], 0
jne 0x518572
cmp dword [ebx + 0x60], 0x1a1
jne 0x51850d
cmp byte [esi + 0xd57], 0
je 0x51850d
push str.Got_417_while_waiting_for_a_100
push esi
call fcn.0050e8f0
push dword [esi + 0xcac]
mov byte [esi + 0xd58], 1
call dword [0x63b150]
push ebx
push esi
mov dword [esi + 0x118], eax
call fcn.0051a770
add esp, 0x14
jmp 0x518572
cmp byte [esi + 0x6c7], 0
je 0x518537
push str.HTTP_error_before_end_of_send__keep_sending
push esi
call fcn.0050e8f0
add esp, 8
cmp dword [ebx + 0x78], 0
jle 0x518572
or dword [ebx + 0x64], 2
mov dword [ebx + 0x78], 0
jmp 0x518572
push str.HTTP_error_before_end_of_send__stop_sending
push esi
call fcn.0050e8f0
push 2
push edi
call fcn.0050f4f0
push ebx
push esi
call fcn.0051a770
add esp, 0x18
test eax, eax
jne 0x5185f5
mov byte [ebx + 0xc4], 1
cmp byte [esi + 0xd57], al
je 0x518572
mov dword [ebx + 0x78], 3
cmp byte [esi + 0xd63], 0
je 0x518596
cmp dword [edi + 0x1fc], 0xffffffff
je 0x518596
push str.Keep_sending_data_to_get_tossed_away
push esi
call fcn.0050e8f0
add esp, 8
or dword [ebx + 0x64], 2
cmp byte [ebx + 0xc2], 0
je 0x5186e7
lea eax, [esi + 0x8a4]
push eax
call fcn.00503890
add esp, 4
mov edi, dword [ebx + 0x50]
mov dword [ebp + 8], edi
cmp byte [edi], 0
je 0x5185f3
mov eax, dword [ebp + 0x10]
jmp 0x517cc3
push 2
push edi
call fcn.0050f4f0
add esp, 8
cmp byte [esi + 0x6e9], 0
je 0x5187df
mov eax, dword [ebp + 0x10]
mov byte [ebx + 0xc2], 0
cmp dword [eax], 0
je 0x5185fc
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.0050e830
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.0050e830
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.0050e830
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.0050e830
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.0050e8f0
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 0x518718
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x40000
je 0x51871b
cmp dword [esi + 0x65c], 2
jne 0x51871b
cmp dword [ebx + 4], 0xffffffff
jg 0x51871b
jl 0x518718
cmp dword [ebx], 0xffffffff
ja 0x51871b
mov byte [ecx], 1
cmp dword [ebx + 8], 0
jne 0x51872c
cmp dword [ebx + 0xc], 0
jne 0x51872c
mov byte [ecx], 1
jmp 0x518731
cmp byte [ecx], 0
je 0x518735
and dword [ebx + 0x64], 0xfffffffe
push dword [ebp - 0x10]
push dword [ebp + 8]
push 1
push esi
call fcn.0050e7a0
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.0050e830
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.00503810
add esp, 0xc
test eax, eax
jne 0x5185f5
cmp dword [ebx + 0x4c], eax
jne 0x5185f3
push edi
call fcn.00503880
add esp, 4
push eax
push edi
call fcn.00503940
mov edi, dword [ebp + 0xc]
add esp, 4
push eax
push edi
push esi
call fcn.00518eb0
add esp, 0x10
cmp eax, 2
jne 0x5185f3
push eax
push edi
mov byte [ebx + 0xc2], 0
mov dword [ebx + 0x48], eax
call fcn.0050f4f0
add esp, 8
cmp byte [esi + 0x6e9], 0
jne 0x5185f3
push str.Received_HTTP_0.9_when_not_allowed
push esi
call fcn.0050e830
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret