Function at 0x409630
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Reference http user-agent string

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 0x471805
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xd0
mov eax, dword [0x494054]
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 - 0x74], edi
xor esi, esi
mov byte [ebp - 0x55], 0
push esi
push esi
push esi
xor eax, eax
mov dword [ebp - 0x54], 4
push 4
push str.Mozilla_5.0__Windows_NT_10.0__Win64__x64__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_106.0.0.0_Safari_537.36
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x8c], esi
mov dword [ebp - 0x84], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xac], eax
test eax, eax
je 0x4096d2
push esi
push 0x1bb
push str.api.ipify.org
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
mov dword [ebp - 0x8c], eax
xor eax, eax
mov dword [ebp - 0x50], 0
push str._formatjson
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 7
mov word [ebp - 0x50], ax
call fcn.00406110
mov dword [ebp - 4], 0
test esi, esi
je 0x409797
cmp dword [ebp - 0x3c], 8
lea eax, [ebp - 0x50]
push 0x800000
cmovae eax, dword [ebp - 0x50]
push 0
push 0
push 0
push eax
push 0x4889c0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x84], esi
test esi, esi
je 0x4097ef
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x88], eax
test eax, eax
je 0x40990a
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x88], eax
test eax, eax
je 0x409968
push 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x34]
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov dword [ebp - 0x88], eax
jmp 0x409968
push 0xe
push str.Connect_failed
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
call fcn.00401bb0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x4097ef
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4097e5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fc8
push edx
push ecx
call fcn.0044c564
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [ebp - 0x1b]
mov dword [ebp - 0x7c], ecx
nop dword [eax]
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
mov eax, dword [ebp - 0x7c]
add cl, cl
sub al, cl
mov ecx, edx
add al, 0x30
mov byte [esi], al
mov eax, edx
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x409800
lea eax, [ebp - 0x1b]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp esi, eax
je 0x409855
sub eax, esi
lea ecx, [ebp - 0x70]
push eax
push esi
call fcn.00401bb0
push 0xc
push str.Open_Failed
push 0
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
call fcn.0040a520
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xc8], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xb8], xmm0
mov edx, dword [ebp - 0xb4]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
cmp edx, 0x10
jb 0x4098cc
mov ecx, dword [ebp - 0xc8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4098c2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409904
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4098fa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov esi, dword [ebp - 0x84]
push 0xb
push str.Send_Failed
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
call fcn.00401bb0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409962
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409958
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fc8
push edx
push ecx
call fcn.0044c564
add esp, 8
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x38], 0
test eax, eax
je 0x409dd4
nop word [eax + eax]
lea eax, [ebp - 0x54]
mov dword [ebp - 0x54], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x409ab2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [ebp - 0x1b]
mov dword [ebp - 0x7c], ecx
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
mov eax, dword [ebp - 0x7c]
add cl, cl
sub al, cl
mov ecx, edx
add al, 0x30
mov byte [esi], al
mov eax, edx
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x4099a8
lea eax, [ebp - 0x1b]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp esi, eax
je 0x4099fd
sub eax, esi
lea ecx, [ebp - 0x70]
push eax
push esi
call fcn.00401bb0
push 0x27
push str.Error__u_in_WinHttpQueryDataAvailable._n
push 0
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 2
call fcn.0040a520
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xc8], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xb8], xmm0
mov edx, dword [ebp - 0xb4]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
cmp edx, 0x10
jb 0x409a74
mov ecx, dword [ebp - 0xc8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409a6a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409aac
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409aa2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov esi, dword [ebp - 0x84]
mov eax, dword [ebp - 0x54]
xor ecx, ecx
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00451031
mov edi, eax
add esp, 4
test edi, edi
je 0x409d72
mov eax, dword [ebp - 0x54]
inc eax
push eax
push 0
push edi
call fcn.0044e510
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x54]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x409c1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [ebp - 0x1b]
mov dword [ebp - 0x7c], ecx
nop dword [eax]
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
mov eax, dword [ebp - 0x7c]
add cl, cl
sub al, cl
mov ecx, edx
add al, 0x30
mov byte [esi], al
mov eax, edx
mov dword [ebp - 0x7c], eax
test eax, eax
jne 0x409b10
lea eax, [ebp - 0x1b]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp esi, eax
je 0x409b65
sub eax, esi
lea ecx, [ebp - 0x70]
push eax
push esi
call fcn.00401bb0
push 0x1d
push str.Error__u_in_WinHttpReadData._n
push 0
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 3
call fcn.0040a520
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xe0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xd0], xmm0
mov edx, dword [ebp - 0xcc]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
cmp edx, 0x10
jb 0x409bdc
mov ecx, dword [ebp - 0xe0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409bd2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409d58
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409c0e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
jmp 0x409d58
push dword [ebp - 0x54]
mov dword [ebp - 0x70], 0
lea ecx, [ebp - 0x70]
push edi
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
call fcn.00401bb0
mov esi, dword [ebp - 0x74]
mov eax, esi
mov byte [ebp - 4], 4
cmp dword [esi + 0x14], 0x10
jb 0x409c53
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x70]
push eax
push 0
call fcn.0040a520
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0xa8]
movq qword [ebp - 0x80], xmm1
movq qword [ebp - 0x98], xmm1
movups xmmword [ebp - 0x30], xmm0
movups xmmword [ebp - 0xa8], xmm0
cmp esi, eax
je 0x409ce2
mov ecx, dword [esi + 0x14]
cmp ecx, 0x10
jb 0x409cd8
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x409cc5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
mov eax, edx
push ecx
push eax
call fcn.0044c564
movups xmm0, xmmword [ebp - 0x30]
add esp, 8
movq xmm1, qword [ebp - 0x80]
movups xmmword [esi], xmm0
movq qword [esi + 0x10], xmm1
jmp 0x409d1c
mov edx, dword [ebp - 0x94]
cmp edx, 0x10
jb 0x409d1c
mov ecx, dword [ebp - 0xa8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409d12
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409d54
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409d4a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fb9
push edx
push ecx
call fcn.0044c564
add esp, 8
mov byte [ebp - 0x55], 1
push edi
call fcn.0044c595
add esp, 4
cmp dword [ebp - 0x54], 0
jbe 0x409dd1
mov esi, dword [ebp - 0x84]
jmp 0x409980
push 0xe
push str.Out_of_memory_n
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
call fcn.00401bb0
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409dca
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409dc0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fc8
push edx
push ecx
call fcn.0044c564
add esp, 8
mov dword [ebp - 0x54], 0
mov edi, dword [ebp - 0x74]
push edi
lea ecx, [ebp - 0xa8]
call fcn.00405f50
mov edx, dword [ebp - 0x94]
cmp edx, 0x10
jb 0x409e1a
mov ecx, dword [ebp - 0xa8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409e10
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fbe
push edx
push ecx
call fcn.0044c564
add esp, 8
cmp dword [ebp - 0x88], 0
jne 0x409f35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [ebp - 0x1b]
mov dword [ebp - 0x74], ecx
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
mov eax, dword [ebp - 0x74]
add cl, cl
sub al, cl
mov ecx, edx
add al, 0x30
mov byte [esi], al
mov eax, edx
mov dword [ebp - 0x74], eax
test eax, eax
jne 0x409e35
lea eax, [ebp - 0x1b]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp esi, eax
je 0x409e8a
sub eax, esi
lea ecx, [ebp - 0x70]
push eax
push esi
call fcn.00401bb0
push 0x17
push str.Error__d_has_occurred._n
push 0
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 5
call fcn.0040a520
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xa8], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x98], xmm0
mov edx, dword [ebp - 0x94]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
cmp edx, 0x10
jb 0x409f01
mov ecx, dword [ebp - 0xa8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409ef7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fc3
push edx
push ecx
call fcn.0044c564
add esp, 8
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x409f35
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x409f2b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fc3
push edx
push ecx
call fcn.0044c564
add esp, 8
mov eax, dword [ebp - 0x84]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x409f48
push eax
call esi
mov eax, dword [ebp - 0x8c]
test eax, eax
je 0x409f55
push eax
call esi
mov eax, dword [ebp - 0xac]
test eax, eax
je 0x409f62
push eax
call esi
mov edx, dword [ebp - 0x3c]
cmp edx, 8
jb 0x409f98
mov ecx, dword [ebp - 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x409f8e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409fc8
push edx
push ecx
call fcn.0044c564
add esp, 8
mov al, byte [ebp - 0x55]
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.0044c0d8
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00450fe0
call fcn.00450fe0
call fcn.00450fe0
call fcn.00450fe0
int3