Function at 0x1003a740
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 0x1004c046
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x60
mov eax, dword [0x1005d040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x48], 0
push 7
movups xmmword [esi], xmm0
push str.Unknown
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
call fcn.100315e0
push 0
push 0
push 0
push 0
mov dword [ebp - 4], 0
push str.WinHTTP_Example_1.0
mov dword [ebp - 0x48], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x1003ab39
push 0
push 0x50
push str.api.ipify.org
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x50], eax
test eax, eax
je 0x1003ab34
push 0
push 0
push 0
push 0
push str.__formatjson
push 0x10054050
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x1003ab2c
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1003ab29
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1003ab29
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], 1
nop dword [eax]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1003a930
mov eax, dword [ebp - 0x34]
inc eax
push eax
call fcn.1004a29d
mov edi, eax
mov eax, dword [ebp - 0x34]
inc eax
push eax
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1003a927
mov esi, dword [ebp - 0x18]
mov eax, esi
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
sub eax, edx
mov dword [ebp - 0x38], ecx
push ecx
push edi
cmp ecx, eax
ja 0x1003a904
lea eax, [edx + ecx]
cmp esi, 0xf
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
lea esi, [eax + edx]
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x38]
add esp, 0xc
mov byte [esi + eax], 0
jmp 0x1003a910
push dword [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.10045e40
push edi
call fcn.1004a298
add esp, 4
cmp dword [ebp - 0x34], 0
jbe 0x1003a930
mov esi, dword [ebp - 0x3c]
jmp 0x1003a880
push edi
call fcn.1004a298
add esp, 4
cmp dword [ebp - 0x18], 0xf
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
cmova ecx, edx
mov dword [ebp - 0x4c], ecx
cmp eax, 6
jb 0x1003aaed
add eax, 0xfffffffb
add eax, ecx
mov dword [ebp - 0x38], eax
sub eax, ecx
push eax
push 0x22
push ecx
call sub.VCRUNTIME140.dll_memchr
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1003aaea
nop dword [eax]
mov ecx, esi
mov edx, str._ip_:_
mov edi, 2
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1003a98d
add ecx, 4
mov edi, 0xfffffffe
add edx, 4
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1003a9b4
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1003a9b4
cmp edi, 0xfffffffe
je 0x1003a9b0
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1003a9b4
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x1003a9b4
xor eax, eax
jmp 0x1003a9b9
sbb eax, eax
or eax, 1
test eax, eax
je 0x1003a9da
mov eax, dword [ebp - 0x38]
inc esi
sub eax, esi
push eax
push 0x22
push esi
call sub.VCRUNTIME140.dll_memchr
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1003a970
jmp 0x1003aaea
sub esi, dword [ebp - 0x4c]
cmp esi, 0xffffffff
je 0x1003aaea
mov edx, dword [ebp - 0x2c]
lea edi, [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
add esi, 6
cmp dword [ebp - 0x18], 0xf
mov dword [ebp - 0x38], esi
cmova edi, edx
cmp ecx, 1
jb 0x1003aa57
lea eax, [ecx - 1]
cmp esi, eax
ja 0x1003aa57
lea esi, [ecx + edi]
mov ecx, dword [ebp - 0x38]
add ecx, edi
mov eax, esi
sub eax, ecx
push eax
push 0x22
push ecx
call sub.VCRUNTIME140.dll_memchr
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x1003aa51
movzx eax, byte [ecx]
cmp al, 0x22
jne 0x1003aa31
xor eax, eax
jmp 0x1003aa36
sbb eax, eax
or eax, 1
test eax, eax
je 0x1003aa85
inc ecx
mov eax, esi
sub eax, ecx
push eax
push 0x22
push ecx
call sub.VCRUNTIME140.dll_memchr
mov ecx, eax
add esp, 0xc
test ecx, ecx
jne 0x1003aa26
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
or ecx, 0xffffffff
cmp ecx, 0xffffffff
je 0x1003aaed
mov eax, dword [ebp - 0x1c]
xorps xmm0, xmm0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
movups xmmword [ebp - 0x6c], xmm0
cmp eax, esi
jb 0x1003ab59
jmp 0x1003aa8f
mov edx, dword [ebp - 0x2c]
sub ecx, edi
mov esi, dword [ebp - 0x38]
jmp 0x1003aa5a
sub eax, esi
sub ecx, esi
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x18], 0xf
lea eax, [ebp - 0x2c]
cmova eax, edx
push ecx
add eax, esi
lea ecx, [ebp - 0x6c]
push eax
call fcn.100315e0
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x6c]
push eax
call fcn.10030ce0
mov ecx, dword [ebp - 0x58]
cmp ecx, 0xf
jbe 0x1003aaea
mov edx, dword [ebp - 0x6c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1003aae0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1003ab10
push ecx
push edx
call fcn.10049f8a
add esp, 8
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x1003ab20
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1003ab16
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1003ab16
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.10049f8a
add esp, 8
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov esi, dword [ebp - 0x3c]
push esi
call edi
push dword [ebp - 0x50]
call edi
mov esi, dword [ebp - 0x40]
push dword [ebp - 0x44]
call edi
mov eax, esi
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.10049b4d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.10045260
int3