Function at 0x40d390
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x586f0c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, edx
mov dword [ebp - 0x210], eax
mov eax, dword [esi]
mov dword [ebp - 0x20c], ecx
mov ecx, 0x53a098
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40d3e0
test dl, dl
je 0x40d3dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40d3e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40d3c0
xor eax, eax
jmp 0x40d3e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40d417
cmp dword [esi + 0x1c], eax
jne 0x40d417
cmp dword [0x58a208], eax
je 0x40d403
push str.POST_request_with_no_Content_Length._n
call fcn.00401113
add esp, 4
mov eax, 0x190
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
push ebx
push edi
lea edi, [esi + 0x18]
push edi
mov dword [esi + 0x14], 1
call fcn.00401019
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40d45b
cmp dword [0x58a204], 0
je 0x40d448
push str.Error_removing_hop_by_hop_headers._n
call fcn.00401113
add esp, 4
pop edi
mov eax, ebx
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
je 0x40d488
cmp eax, 0x50
je 0x40d488
mov edx, dword [esi + 8]
push eax
push edx
push str._s:_hu
lea eax, [ebp - 0x204]
push 0x200
push eax
call fcn.00416f20
add esp, 0x14
jmp 0x40d4a5
mov ecx, dword [esi + 8]
push ecx
push 0x53a1c4
lea edx, [ebp - 0x204]
push 0x200
push edx
call fcn.00416f20
add esp, 0x10
test eax, eax
js 0x40d85f
cmp eax, 0x200
jae 0x40d85f
mov ecx, dword [edi]
lea eax, [ebp - 0x204]
push eax
push str.Host
push ecx
call fcn.00401163
push str.close
push str.Connection
push eax
mov dword [edi], eax
call fcn.00401163
lea edx, [ebp - 0x214]
push edx
push esi
mov dword [edi], eax
call fcn.0040124e
mov ecx, dword [ebp - 0x20c]
mov edx, dword [ecx]
add esp, 0x20
mov edi, eax
mov eax, dword [ebp - 0x214]
push 0
push eax
push edi
push edx
call dword [sym.imp.WS2_32.dll_send]
push edi
mov ebx, eax
call fcn.004be321
add esp, 4
test ebx, ebx
js 0x40d7c9
mov eax, dword [esi + 0x20]
cmp eax, dword [esi + 0x1c]
jae 0x40d591
jmp 0x40d530
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x20]
cmp eax, 0x200
jbe 0x40d542
mov eax, 0x200
mov ebx, dword [ebp - 0x210]
push eax
lea ecx, [ebp - 0x204]
push ecx
push ebx
call fcn.0040123f
add esp, 0xc
test eax, eax
js 0x40d7c9
je 0x40d597
add dword [esi + 0x20], eax
push 0
push eax
mov eax, dword [ebp - 0x20c]
mov ecx, dword [eax]
lea edx, [ebp - 0x204]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
js 0x40d7c9
mov edx, dword [esi + 0x20]
cmp edx, dword [esi + 0x1c]
jb 0x40d530
jmp 0x40d597
mov ebx, dword [ebp - 0x210]
cmp dword [0x58a208], 0
je 0x40d5b9
mov eax, dword [esi + 0x20]
mov esi, dword [esi + 0x1c]
cmp eax, esi
jae 0x40d5b9
push esi
push eax
push str.Received_only__lu_request_body_bytes__Content_Length_was__lu_._n
call fcn.00401113
add esp, 0xc
mov ecx, dword [ebp - 0x20c]
lea eax, [ebp - 0x208]
push eax
push ecx
call fcn.00401131
mov edi, 1
add esp, 8
mov esi, eax
cmp dword [0x58a208], edi
jle 0x40d5f2
mov edx, dword [ebp - 0x208]
push edx
push str.Status_Line:__s
call fcn.00401113
add esp, 8
test esi, esi
je 0x40d623
cmp dword [0x58a204], 0
je 0x40d715
push str.Error_reading_Status_Line._n
call fcn.00401113
add esp, 4
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x208]
lea eax, [ebp - 0x22c]
push eax
push ecx
call fcn.00401285
mov edx, dword [ebp - 0x208]
push edx
mov esi, eax
call fcn.004be321
add esp, 0xc
test esi, esi
je 0x40d678
cmp dword [0x58a204], 0
je 0x40d715
push str.Error_parsing_Status_Line._n
call fcn.00401113
add esp, 4
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x20c]
lea eax, [ebp - 0x208]
push eax
push ecx
call fcn.00401235
add esp, 8
test eax, eax
je 0x40d6bb
cmp dword [0x58a204], 0
je 0x40d715
push str.Error_reading_header._n
call fcn.00401113
add esp, 4
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
cmp dword [0x58a208], edi
jle 0x40d6d7
mov edx, dword [ebp - 0x208]
push edx
push str.Response_header:_n_s
call fcn.00401113
add esp, 8
mov eax, dword [ebp - 0x208]
push eax
lea ecx, [ebp - 0x22c]
push ecx
call fcn.00401244
mov edx, dword [ebp - 0x208]
push edx
mov esi, eax
call fcn.004be321
add esp, 0xc
test esi, esi
je 0x40d728
cmp dword [0x58a204], 0
je 0x40d715
push str.Error_parsing_response_header._n
call fcn.00401113
add esp, 4
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x220]
push eax
mov dword [ebp - 0x22c], edi
call fcn.00401019
mov esi, eax
add esp, 4
test esi, esi
je 0x40d76c
cmp dword [0x58a204], 0
je 0x40d759
push str.Error_removing_hop_by_hop_headers._n
call fcn.00401113
add esp, 4
pop edi
pop ebx
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x220]
push str.close
push str.Connection
push ecx
call fcn.00401163
lea edx, [ebp - 0x214]
mov dword [ebp - 0x220], eax
push edx
lea eax, [ebp - 0x22c]
push eax
call fcn.00401253
mov ecx, dword [ebp - 0x214]
push ecx
mov esi, eax
push esi
push ebx
call fcn.004010ff
push esi
mov edi, eax
call fcn.004be321
add esp, 0x24
test edi, edi
jns 0x40d7e0
lea edx, [ebp - 0x22c]
push edx
call fcn.004011c7
add esp, 4
pop edi
pop ebx
mov eax, 0x1f8
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x218]
test ecx, ecx
je 0x40d7f4
cmp edx, ecx
jae 0x40d83d
mov eax, ecx
sub eax, edx
mov edx, 0x200
test ecx, ecx
je 0x40d807
cmp eax, edx
jae 0x40d807
mov edx, eax
mov ecx, dword [ebp - 0x20c]
push edx
lea eax, [ebp - 0x204]
push eax
push ecx
call fcn.0040123f
add esp, 0xc
test eax, eax
jle 0x40d83d
add dword [ebp - 0x218], eax
push eax
lea edx, [ebp - 0x204]
push edx
push ebx
call fcn.004010ff
add esp, 0xc
test eax, eax
jns 0x40d7e0
lea eax, [ebp - 0x22c]
push eax
call fcn.004011c7
add esp, 4
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop ebx
xor ecx, ebp
mov eax, 0x1f5
pop esi
call fcn.004bf32e
mov esp, ebp
pop ebp
ret