Function at 0x10038360
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100463bd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x10086040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x44], edi
push 0
push 0
push 0
push 0
push str.A_WinHTTP_Example_Program_1.0
mov dword [ebp - 0x44], edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
jne 0x100383e1
xorps xmm0, xmm0
mov ecx, edi
push 0x24
movups xmmword [edi], xmm0
push str.Error:_Unable_to_initialize_WinHTTP.
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
call fcn.10037bf0
jmp 0x100386ae
push 0
push 0x50
push str.api.ipify.org
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x10038426
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xorps xmm0, xmm0
mov ecx, edi
push 0x27
movups xmmword [edi], xmm0
push str.Error:_Unable_to_connect_to_the_server.
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10037bf0
jmp 0x100386ae
push 0
push 0
push 0
push 0
push 0x1007f5e8
push 0x1007f5ec
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x40], esi
test esi, esi
jne 0x1003847f
push dword [ebp - 0x38]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x3c]
call esi
xorps xmm0, xmm0
mov ecx, edi
push 0x23
movups xmmword [edi], xmm0
push str.Error:_Unable_to_open_HTTP_request.
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10037bf0
jmp 0x100386ae
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x100384d0
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x3c]
call esi
xorps xmm0, xmm0
mov ecx, edi
push 0x23
movups xmmword [edi], xmm0
push str.Error:_Unable_to_send_HTTP_request.
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10037bf0
jmp 0x100386ae
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x10038517
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x3c]
call esi
xorps xmm0, xmm0
mov ecx, edi
push 0x27
movups xmmword [edi], xmm0
push str.Error:_Unable_to_receive_HTTP_response.
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10037bf0
jmp 0x100386ae
xor eax, eax
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x20], eax
mov eax, 0xf
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x30], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x100386ce
mov eax, dword [ebp - 0x34]
inc eax
push eax
call fcn.10044cd9
mov ecx, dword [ebp - 0x34]
mov esi, eax
inc ecx
mov dword [ebp - 0x4c], esi
push ecx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x34]
push esi
push dword [ebp - 0x40]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10038638
mov edx, dword [ebp - 0x1c]
mov eax, edx
mov ecx, dword [ebp - 0x18]
sub eax, dword [ebp - 0x48]
mov dword [ebp - 0x44], ecx
push ecx
cmp ecx, eax
ja 0x100385d2
mov esi, dword [ebp - 0x48]
cmp edx, 0xf
push dword [ebp - 0x4c]
lea eax, [esi + ecx]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
cmova eax, dword [ebp - 0x30]
add esi, eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x44]
add esp, 0xc
mov byte [esi + eax], 0
mov esi, dword [ebp - 0x4c]
jmp 0x100385df
push esi
push dword [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x30]
call fcn.10037cd0
push esi
call fcn.10044cd4
add esp, 4
cmp dword [ebp - 0x34], 0
jbe 0x100385fc
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x48], eax
jmp 0x10038540
push dword [ebp - 0x40]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x3c]
call esi
xorps xmm0, xmm0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
movups xmm0, xmmword [ebp - 0x30]
mov dword [edi + 0x14], 0
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x20]
movq qword [edi + 0x10], xmm0
jmp 0x100386ae
push esi
call fcn.10044cd4
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 4
push dword [ebp - 0x40]
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x3c]
call esi
xorps xmm0, xmm0
mov ecx, edi
push 0x1b
movups xmmword [edi], xmm0
push str.Error:_Unable_to_read_data.
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10037bf0
mov eax, dword [ebp - 0x1c]
cmp eax, 0xf
jbe 0x100386ae
mov edx, dword [ebp - 0x30]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x100386a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1003872f
push ecx
push edx
call fcn.10044874
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10044743
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x3c]
call esi
xorps xmm0, xmm0
mov ecx, edi
push 0x29
movups xmmword [edi], xmm0
push str.Error:_Unable_to_query_data_availability.
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10037bf0
mov eax, dword [ebp - 0x1c]
cmp eax, 0xf
jbe 0x100386ae
mov edx, dword [ebp - 0x30]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x100386a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100386a4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3