Function at 0x4157b0
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
mov esi, dword fs:[0x18]
movzx ebx, bx
sub esp, 0x34
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 edi, eax
mov dword [ebp - 0x20], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf95
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 edi, edi
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 0xc], 0
mov dword [esp + 4], str.localhost
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov edi, eax
mov dword [ebp - 0x24], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf98
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 [esp], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x439a14
mov dword [esp + 4], 0
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf9b
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 edi, edi
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpSendRequest]
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf9e
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
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], edi
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xfa1
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp + 4], str.expected_success_n
xor esi, esi
mov dword [esp], eax
call fcn.00410490
lea esi, [esi]
lea esi, [esi]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0xdeadbeef
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpQueryDataAvailable]
sub esp, 8
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xfa7
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.WinHttpQueryDataAvailable_failed_with_error__lu_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00410490
test ebx, ebx
jne 0x415a60
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x415a99
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xfb8
xor eax, eax
cmp esi, 0x2250
sete al
mov dword [esp + 8], esi
mov dword [esp + 4], str.got_wrong_length:__lu_n
mov dword [esp], eax
call fcn.00410490
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [esp], edi
call ebx
mov eax, dword [ebp - 0x24]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x20]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xfa8
xor eax, eax
mov dword [esp + 4], str.WinHttpQueryDataAvailable_return_wrong_length_n
cmp dword [ebp - 0x14], 0xdeadbeef
setne al
mov dword [esp], eax
call fcn.00410490
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4159fa
add eax, 1
mov dword [esp + 4], 0
mov ebx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, eax
sub esp, 0xc
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [ebp - 0x1c], edx
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpReadData]
sub esp, 0x10
mov dword [ebp - 0x18], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xfaf
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.WinHttpReadData_failed:__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x18]
mov dword [esp], ecx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], 0xfb0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], ecx
cmp ecx, eax
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.only_got__lu_of__lu_available_n
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x10]
sub esp, 0xc
test eax, eax
je 0x4159fa
add esi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x4159a0
jmp 0x4159fa