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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003c03d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x10047040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x40], edi
push 0
push 0
push 0
push 0
push str.A_WinHTTP_Example_Program_1.0
mov dword [ebp - 0x40], edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x1003411d
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.10031b20
jmp 0x100343ee
push 0
push 0x50
push str.api.ipify.org
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x10034162
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.10031b20
jmp 0x100343ee
push 0
push 0
push 0
push 0
push 0x10042df8
push 0x10042dfc
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
jne 0x100341bb
push dword [ebp - 0x34]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x38]
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.10031b20
jmp 0x100343ee
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 0x1003420c
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x34]
call esi
push dword [ebp - 0x38]
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.10031b20
jmp 0x100343ee
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x10034253
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x34]
call esi
push dword [ebp - 0x38]
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.10031b20
jmp 0x100343ee
xor eax, eax
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x1c], eax
mov eax, 0xf
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], 0
nop dword [eax]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1003440b
mov eax, dword [ebp - 0x30]
inc eax
push eax
call fcn.1003a489
mov ecx, dword [ebp - 0x30]
mov esi, eax
inc ecx
mov dword [ebp - 0x48], esi
push ecx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x30]
push esi
push dword [ebp - 0x3c]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10034378
mov edx, dword [ebp - 0x18]
mov eax, edx
mov ecx, dword [ebp - 0x14]
sub eax, dword [ebp - 0x44]
mov dword [ebp - 0x40], ecx
push ecx
cmp ecx, eax
ja 0x10034312
mov esi, dword [ebp - 0x44]
cmp edx, 0xf
push dword [ebp - 0x48]
lea eax, [esi + ecx]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
add esi, eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x40]
add esp, 0xc
mov byte [esi + eax], 0
mov esi, dword [ebp - 0x48]
jmp 0x1003431f
push esi
push dword [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.10031c10
push esi
call fcn.1003a484
add esp, 4
cmp dword [ebp - 0x30], 0
jbe 0x1003433c
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 0x44], eax
jmp 0x10034280
push dword [ebp - 0x3c]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x34]
call esi
push dword [ebp - 0x38]
call esi
xorps xmm0, xmm0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
movups xmm0, xmmword [ebp - 0x2c]
mov dword [edi + 0x14], 0
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [edi + 0x10], xmm0
jmp 0x100343ee
push esi
call fcn.1003a484
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 4
push dword [ebp - 0x3c]
call esi
push dword [ebp - 0x34]
call esi
push dword [ebp - 0x38]
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.10031b20
mov eax, dword [ebp - 0x18]
cmp eax, 0xf
jbe 0x100343ee
mov edx, dword [ebp - 0x2c]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x100343e4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1003446c
push ecx
push edx
call fcn.1003a024
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 - 0x10]
xor ecx, ebp
call fcn.10039ef3
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x34]
call esi
push dword [ebp - 0x38]
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.10031b20
mov eax, dword [ebp - 0x18]
cmp eax, 0xf
jbe 0x100343ee
mov edx, dword [ebp - 0x2c]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x100343e4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100343e4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3