Function at 0x415460
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x12c
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], str.winetest
call dword [sym.imp.winhttp.dll_WinHttpOpen]
sub esp, 0x14
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xaaa
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.failed_to_open_session__lu_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
movzx eax, di
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], str.localhost
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov edi, eax
mov dword [ebp - 0x114], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xaad
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.failed_to_open_a_connection__lu_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [ebp - 0x11c], ebx
xor edx, edx
mov eax, dword [edx*4 + 0x43d288]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], str._test
mov dword [ebp - 0x118], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x114]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xab1
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.failed_to_open_a_request__lu_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 0xc], 0x20000000
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], str.Transfer_Encoding:_chunked
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpAddRequestHeaders]
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xab4
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_add_header__lu_n
call fcn.00410490
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0x74736f70
mov byte [ebp - 0x108], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpSendRequest]
sub esp, 0x1c
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xab8
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_send_request__lu_n
call fcn.00410490
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xaba
mov eax, dword [esi + 0x34]
mov dword [esp], edi
lea edi, [ebp - 0x10c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_receive_response__lu_n
call fcn.00410490
xor eax, eax
mov ecx, 0x40
mov dword [ebp - 0x110], 0
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x110]
mov dword [esp + 8], 0x100
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x10c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpReadData]
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xabe
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.failed_to_read_data__lu_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xabf
mov eax, dword [ebp - 0x110]
mov dword [esp + 4], str.got_count__ld_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x118]
sub esp, 4
test edx, edx
jne 0x415780
mov edx, 1
jmp 0x41553a
mov eax, dword [ebp - 0x114]
mov ebx, dword [ebp - 0x11c]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret