Function at 0xd17890
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]
mov ebx, ecx
push edi
push ecx
mov edx, dword [esi + 0xd8]
mov edi, edx
mov eax, edx
mov dword [ebp - 0x14], ecx
push 0xa
push eax
mov dword [ebp - 0x18], edx
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], ecx
call fcn.00d4d260
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0xd1819e
nop
mov edx, dword [ebp + 0x10]
sub edi, ecx
lea eax, [edi - 1]
add eax, ebx
lea edi, [esi + 0x8b8]
mov dword [edx], eax
lea eax, [ecx + 1]
mov ecx, dword [ebp + 8]
mov dword [esi + 0xd8], eax
sub eax, ecx
push eax
push ecx
push edi
call fcn.00d052c0
add esp, 0xc
test eax, eax
jne 0xd17963
cmp dword [esi + 0xd4], eax
jne 0xd1796a
push edi
call fcn.00d05330
add esp, 4
push eax
push edi
call fcn.00d053f0
mov ebx, dword [ebp + 0xc]
add esp, 4
push eax
push ebx
push esi
call fcn.00d18ac0
add esp, 0x10
cmp eax, 2
jne 0xd1796d
push eax
push ebx
call fcn.00d0f800
add esp, 8
cmp byte [esi + 0x6f1], 0
je 0xd18215
mov eax, dword [ebp + 0x10]
mov byte [esi + 0x14a], 0
cmp dword [eax], 0
je 0xd1822f
mov dword [esi + 0xd0], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
push edi
call fcn.00d053f0
mov edx, eax
add esp, 4
mov dword [ebp - 8], edx
mov al, byte [edx]
cmp al, 0xa
je 0xd17d5f
cmp al, 0xd
je 0xd17d5f
mov ecx, dword [esi + 0xd4]
mov edi, 2
lea eax, [ecx + 1]
mov dword [esi + 0xd4], eax
test ecx, ecx
jne 0xd17ca9
mov eax, dword [ebx + 0x1e8]
mov eax, dword [eax + 0x44]
test al, 3
je 0xd17bba
mov al, byte [edx]
mov edi, edx
test al, al
je 0xd179d2
cmp al, 0x20
je 0xd179ca
cmp al, 9
jne 0xd179d2
mov al, byte [edi + 1]
inc edi
test al, al
jne 0xd179c2
push 5
push str.HTTP_
push edi
call fcn.00d5dfd0
add esp, 0xc
test eax, eax
jne 0xd17a82
movsx ecx, byte [edi + 5]
mov eax, ecx
sub eax, 0x31
je 0xd17ac4
sub eax, 1
je 0xd17a07
sub eax, 1
jne 0xd18250
mov al, byte [edi + 6]
cmp al, 0x20
je 0xd17a12
cmp al, 9
jne 0xd17a82
lea edx, [ecx - 0x30]
mov cl, byte [edi + 7]
mov al, cl
lea edx, [edx + edx*4]
add edx, edx
sub al, 0x30
mov dword [ebp - 0x10], edx
cmp al, 9
ja 0xd17a82
mov al, byte [edi + 8]
mov byte [ebp + 0xb], al
sub al, 0x30
cmp al, 9
ja 0xd17a82
mov al, byte [edi + 9]
mov byte [ebp - 1], al
sub al, 0x30
cmp al, 9
ja 0xd17a82
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 ecx, [ecx - 0xa68]
lea ecx, [eax + ecx*2]
mov dword [esi + 0xe8], ecx
mov al, byte [edi + 0xa]
cmp al, 0x20
je 0xd17b5e
cmp al, 9
je 0xd17b5e
cmp al, 0xa
jl 0xd17a82
cmp al, 0xd
jle 0xd17b5e
lea edi, [esi + 0x8b8]
push edi
call fcn.00d05330
add esp, 4
push eax
push edi
call fcn.00d053f0
add esp, 4
push eax
push esi
call fcn.00d18a00
add esp, 0xc
cmp eax, 1
jne 0xd182e1
mov dword [esi + 0xe8], 0xc8
mov byte [ebx + 0x455], 0xa
jmp 0xd17c94
cmp byte [edi + 6], 0x2e
jne 0xd182bb
mov al, byte [edi + 7]
cmp al, 0x30
je 0xd17add
cmp al, 0x31
jne 0xd182bb
mov cl, byte [edi + 8]
cmp cl, 0x20
je 0xd17aee
cmp cl, 9
jne 0xd182bb
mov cl, byte [edi + 9]
movsx edx, al
mov al, cl
sub edx, 0x26
sub al, 0x30
mov dword [ebp - 0x10], edx
cmp al, 9
ja 0xd182bb
mov al, byte [edi + 0xa]
mov byte [ebp + 0xb], al
sub al, 0x30
cmp al, 9
ja 0xd182bb
mov al, byte [edi + 0xb]
mov byte [ebp - 1], al
sub al, 0x30
cmp al, 9
ja 0xd182bb
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 ecx, [ecx - 0xa68]
lea ecx, [eax + ecx*2]
mov dword [esi + 0xe8], ecx
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0xd17b5e
cmp al, 9
je 0xd17b5e
sub al, 0xa
cmp al, 3
ja 0xd182bb
cmp ecx, 0x64
jl 0xd182a1
mov eax, edx
sub eax, 0xa
je 0xd17b77
sub eax, 1
jne 0xd1826a
mov byte [ebx + 0x455], dl
mov al, dl
cmp dword [esi + 0x104], 3
jne 0xd17ba1
cmp dl, 0x14
je 0xd17ba1
push str.Lying_server__not_serving_HTTP_2
push esi
call fcn.00d0ec60
mov al, byte [ebx + 0x455]
add esp, 8
cmp al, 0x14
jae 0xd17c94
mov eax, dword [ebx + 0x428]
mov dword [eax], 0xffffffff
jmp 0xd17c94
test eax, 0x40000
je 0xd182e1
mov al, byte [edx]
mov edi, edx
test al, al
je 0xd17be0
nop dword [eax]
cmp al, 0x20
je 0xd17bd8
cmp al, 9
jne 0xd17be0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0xd17bd0
push 5
push str.RTSP_
push edi
call fcn.00d5dfd0
add esp, 0xc
test eax, eax
jne 0xd182e1
mov al, byte [edi + 5]
sub al, 0x30
cmp al, 9
ja 0xd182d5
cmp byte [edi + 6], 0x2e
jne 0xd182d5
mov al, byte [edi + 7]
sub al, 0x30
cmp al, 9
ja 0xd182d5
mov al, byte [edi + 8]
cmp al, 0x20
je 0xd17c2b
cmp al, 9
jne 0xd182d5
mov cl, byte [edi + 9]
mov al, cl
sub al, 0x30
cmp al, 9
ja 0xd182d5
mov dl, byte [edi + 0xa]
mov al, dl
sub al, 0x30
cmp al, 9
ja 0xd182d5
mov dh, byte [edi + 0xb]
mov al, dh
sub al, 0x30
cmp al, 9
ja 0xd182d5
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 + 0xe8], eax
mov al, byte [edi + 0xc]
cmp al, 0x20
je 0xd17c8d
cmp al, 9
je 0xd17c8d
sub al, 0xa
cmp al, 3
ja 0xd182d5
mov byte [ebx + 0x455], 0xb
push ebx
push esi
call fcn.00d18660
add esp, 8
test eax, eax
jne 0xd17963
lea edi, [eax + 6]
push esi
call fcn.00d193d0
add esp, 4
test eax, eax
jne 0xd17963
push dword [ebp - 8]
push ebx
push esi
call fcn.00d16810
add esp, 0xc
test eax, eax
jne 0xd17963
mov ebx, edi
or ebx, 1
cmp byte [esi + 0x6d3], al
lea eax, [esi + 0x8b8]
cmove ebx, edi
mov edi, dword [esi + 0xe8]
push eax
call fcn.00d05330
push eax
push dword [ebp - 8]
push 1
push esi
call fcn.00d0eb00
lea eax, [esi + 0x8b8]
push eax
call fcn.00d05330
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.00d0ece0
add esp, 0x28
test eax, eax
jne 0xd17963
lea ebx, [esi + 0x8b8]
push ebx
call fcn.00d05330
add dword [esi + 0xd98], eax
push ebx
adc dword [esi + 0xd9c], 0
call fcn.00d05330
add esp, 8
add dword [esi + 0xa8], eax
adc dword [esi + 0xac], 0
jmp 0xd18163
mov ecx, dword [esi + 0xe8]
lea eax, [ecx - 0x64]
cmp eax, 0x63
ja 0xd17de8
sub ecx, 0x64
je 0xd17daa
sub ecx, 1
je 0xd17d8f
lea edi, [esi + 0x14a]
mov dword [esi + 0xd4], 0
mov byte [edi], 1
jmp 0xd17e4b
cmp dword [esi + 0x104], 2
je 0xd182f1
lea edi, [esi + 0x14a]
mov byte [edi], 0
jmp 0xd17e4b
cmp dword [esi + 0x100], 0
lea edi, [esi + 0x14a]
mov byte [edi], 1
mov dword [esi + 0xd4], 0
jle 0xd17e4b
or dword [esi + 0xec], 2
push 0
push esi
mov dword [esi + 0x100], 0
call fcn.00cff7e0
add esp, 8
jmp 0xd17e4b
mov eax, dword [esi + 0x88]
lea edi, [esi + 0x14a]
and eax, dword [esi + 0x8c]
mov byte [edi], 0
cmp eax, 0xffffffff
jne 0xd17e50
cmp byte [esi + 0x14f], 0
jne 0xd17e50
cmp byte [ebx + 0x1ce], 0
jne 0xd17e50
cmp byte [ebx + 0x455], 0xb
jne 0xd17e50
mov eax, dword [ebx + 0x1e8]
test dword [eax + 0x44], 0x40000
jne 0xd17e50
cmp byte [esi + 0xd5e], 5
je 0xd17e50
push str.no_chunk__no_close__no_size._Assume_close_to_signal_end
push esi
call fcn.00d0ec60
push 2
push ebx
call fcn.00d0f800
add esp, 0x10
cmp byte [edi], 0
jne 0xd17e61
push esi
call fcn.00d18590
add esp, 4
test eax, eax
jne 0xd17963
mov al, byte [ebx + 0x1ce]
test al, al
je 0xd17ef1
mov eax, dword [esi + 0xe8]
cmp eax, 0x191
jne 0xd17e85
cmp dword [ebx + 0x258], 2
je 0xd17e95
cmp eax, 0x197
jne 0xd17eb4
cmp dword [ebx + 0x25c], 2
jne 0xd17eb4
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push esi
call fcn.00d0ec60
mov byte [esi + 0xd65], 1
add esp, 8
mov al, byte [ebx + 0x1ce]
test al, al
je 0xd17ef1
mov eax, dword [esi + 0xe8]
cmp eax, 0x191
jne 0xd17ecc
cmp dword [ebx + 0x2e0], 1
je 0xd17edc
jmp 0xd17ef1
cmp eax, 0x197
jne 0xd17ef1
cmp dword [ebx + 0x2e4], 1
jne 0xd17ef1
push str.Connection_closure_while_negotiating_auth__HTTP_1.0__
push esi
call fcn.00d0ec60
add esp, 8
mov byte [esi + 0xd65], 1
cmp dword [ebx + 0x2e0], 3
jne 0xd17f10
cmp dword [esi + 0xe8], 0x191
je 0xd17f10
mov dword [ebx + 0x2e0], 4
cmp dword [ebx + 0x2e4], 3
jne 0xd17f2f
cmp dword [esi + 0xe8], 0x197
je 0xd17f2f
mov dword [ebx + 0x2e4], 4
mov eax, dword [esi + 0xe8]
sub eax, 0x64
cmp eax, 0x64
sbb edi, edi
xor eax, eax
and edi, 0x10
cmp byte [esi + 0x6d3], al
setne al
add eax, 2
or edi, eax
lea eax, [esi + 0x8b8]
push eax
call fcn.00d05330
add esp, 4
mov dword [ebp - 0x10], eax
push eax
lea eax, [esi + 0x8b8]
push eax
call fcn.00d053f0
add esp, 4
push eax
push edi
push esi
call fcn.00d0ece0
add esp, 0x10
test eax, eax
jne 0xd17963
mov eax, dword [ebp - 0x10]
cdq
mov edi, eax
mov eax, dword [esi + 0xac]
add dword [esi + 0xd98], edi
push esi
adc dword [esi + 0xd9c], edx
add edi, dword [esi + 0xa8]
mov dword [esi + 0xa8], edi
adc eax, edx
mov dword [ebp - 8], eax
mov dword [esi + 0xac], eax
call fcn.00d18f70
add esp, 4
test al, al
mov eax, dword [esi + 0xe8]
jne 0xd1839e
add eax, 0xffffff9c
cmp eax, 0x63
ja 0xd17fd8
mov eax, dword [ebp - 8]
jmp 0xd17fe6
xorps xmm0, xmm0
movlpd qword [ebp - 0xc], xmm0
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
push esi
mov dword [esi + 0xb0], edi
mov dword [esi + 0xb4], eax
call fcn.00d15840
add esp, 4
test eax, eax
jne 0xd17963
cmp dword [esi + 0xe8], 0x12c
jl 0xd18150
cmp byte [ebx + 0x1d8], al
jne case.default.0xd18048
cmp byte [ebx + 0x1ce], al
jne case.default.0xd18048
cmp byte [esi + 0xd73], al
jne 0xd18132
movzx eax, byte [esi + 0xd5e]
dec eax
cmp eax, 3
ja case.default.0xd18048
jmp dword [eax*4 + 0xd183bc]
push 0
push esi
call fcn.00cff7e0
add esp, 8
cmp byte [esi + 0x14c], 0
jne case.default.0xd18048
cmp dword [esi + 0xe8], 0x1a1
jne 0xd180b2
cmp byte [esi + 0xd67], 0
je 0xd180b2
push str.Got_417_while_waiting_for_a_100
push esi
call fcn.00d0ec60
push dword [esi + 0xcbc]
mov byte [esi + 0xd68], 1
call dword [0xdbd100]
mov dword [esi + 0x120], eax
lea eax, [esi + 0x88]
push eax
push esi
call fcn.00d1a3b0
add esp, 0x14
jmp case.default.0xd18048
cmp byte [esi + 0x6cf], 0
je 0xd180e5
push str.HTTP_error_before_end_of_send__keep_sending
push esi
call fcn.00d0ec60
add esp, 8
cmp dword [esi + 0x100], 0
jle case.default.0xd18048
or dword [esi + 0xec], 2
mov dword [esi + 0x100], 0
jmp case.default.0xd18048
push str.HTTP_error_before_end_of_send__stop_sending
push esi
call fcn.00d0ec60
push 2
push ebx
call fcn.00d0f800
lea eax, [esi + 0x88]
push eax
push esi
call fcn.00d1a3b0
add esp, 0x18
test eax, eax
jne 0xd17963
mov byte [esi + 0x14c], 1
cmp byte [esi + 0xd67], al
je case.default.0xd18048
mov dword [esi + 0x100], 3
cmp byte [esi + 0xd73], 0
je 0xd18150
cmp dword [ebx + 0x204], 0xffffffff
je 0xd18150
push str.Keep_sending_data_to_get_tossed_away
push esi
call fcn.00d0ec60
add esp, 8
or dword [esi + 0xec], 2
cmp byte [esi + 0x14a], 0
je 0xd18326
lea ebx, [esi + 0x8b8]
push ebx
call fcn.00d05340
mov edi, dword [esi + 0xd8]
add esp, 4
cmp byte [edi], 0
je 0xd17961
mov ecx, dword [ebp + 0x10]
mov eax, edi
mov dword [ebp + 8], eax
mov ebx, dword [ecx]
push ebx
push 0xa
push eax
mov dword [ebp - 0x10], ebx
call fcn.00d4d260
mov ecx, eax
add esp, 0xc
test ecx, ecx
jne 0xd178d0
push dword [ebp - 0x10]
lea ebx, [esi + 0x8b8]
push dword [ebp + 8]
push ebx
call fcn.00d052c0
add esp, 0xc
test eax, eax
jne 0xd17963
cmp dword [esi + 0xd4], eax
jne 0xd17961
push ebx
call fcn.00d05330
add esp, 4
push eax
push ebx
call fcn.00d053f0
mov edi, dword [ebp + 0xc]
add esp, 4
push eax
push edi
push esi
call fcn.00d18ac0
add esp, 0x10
cmp eax, 2
jne 0xd17961
push eax
push edi
mov byte [esi + 0x14a], 0
mov dword [esi + 0xd0], eax
call fcn.00d0f800
add esp, 8
cmp byte [esi + 0x6f1], 0
jne 0xd17961
push str.Received_HTTP_0.9_when_not_allowed
push esi
call fcn.00d0eba0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0xd0], 2
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
pop edi
mov dword [esi + 0xd8], 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.00d0eba0
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.00d0eba0
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.00d0eba0
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.00d0eba0
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 + 0x14a], 0
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Received_101__Switching_to_HTTP_2
push esi
call fcn.00d0ec60
add esp, 8
mov dword [esi + 0x104], 3
mov byte [esi + 0x14a], 1
mov eax, 1
mov dword [esi + 0xd4], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x154], 0
mov ecx, dword [ebp + 0x14]
jne 0xd1835e
mov eax, dword [ebx + 0x1e8]
test dword [eax + 0x44], 0x40000
je 0xd18361
cmp dword [esi + 0x664], 2
jne 0xd18361
cmp dword [esi + 0x8c], 0xffffffff
jg 0xd18361
jl 0xd1835e
cmp dword [esi + 0x88], 0xffffffff
ja 0xd18361
mov byte [ecx], 1
cmp dword [esi + 0x90], 0
jne 0xd18378
cmp dword [esi + 0x94], 0
jne 0xd18378
mov byte [ecx], 1
jmp 0xd1837d
cmp byte [ecx], 0
je 0xd18384
and dword [esi + 0xec], 0xfffffffe
push dword [ebp - 0x10]
push dword [ebp + 8]
push 1
push esi
call fcn.00d0eb00
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 esi
call fcn.00d0eba0
add esp, 0xc
mov eax, 0x16
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret