Function at 0x4046b0
Capabilities:
Create directory
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 0x42ff8b
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1600
call fcn.0040af80
mov eax, dword [0x43d080]
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, edx
mov esi, ecx
push 0x43921c
push esi
mov dword [ebp - 0x15fc], 0
call fcn.0040b797
lea ecx, [ebp - 0x428]
add eax, 4
push ecx
lea ecx, [ebp - 0x15fc]
push ecx
lea ecx, [ebp - 0x220]
push ecx
push str.__:_:_d_s
push eax
call fcn.00404660
add esp, 0x1c
cmp eax, 3
je 0x40478c
push 0x43921c
push esi
call fcn.0040b797
lea ecx, [ebp - 0x428]
add eax, 4
push ecx
lea ecx, [ebp - 0x220]
push ecx
push str._____s
push eax
call fcn.00404660
add esp, 0x18
cmp eax, 2
jne 0x4047f2
push str.https
push esi
call fcn.0040b797
add esp, 8
neg eax
sbb eax, eax
and eax, 0x16b
add eax, 0x50
mov dword [ebp - 0x15fc], eax
push 0
push 0
push 0
push 0
push str.WinHTTP_Example_1.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
push 0
push dword [ebp - 0x15fc]
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x1608], eax
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x428]
mov dword [ebp - 0x1610], eax
push ecx
push 0x439268
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x160c], esi
test esi, esi
jne 0x4047fc
push str.Failed_to_open_request._n
jmp 0x404bc8
push str.Invalid_URL._n
jmp 0x404bc8
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 0x404bc3
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x404bc3
cmp dword [edi + 0x14], 7
mov esi, edi
mov dword [ebp - 0x1604], edi
jbe 0x40483e
mov esi, dword [edi]
mov dword [ebp - 0x1604], esi
cmp dword [edi + 0x10], 0
je 0x404904
push 0x100
lea eax, [ebp - 0x15f8]
push 0
push eax
call fcn.0040c010
add esp, 0xc
mov ecx, 0x43931c
mov edx, 0x100
movzx eax, word [ecx]
cmp ax, dx
jae 0x4048b6
movzx eax, al
add ecx, 2
mov byte [ebp + eax - 0x15f8], 1
cmp ecx, 0x439320
jne 0x404868
mov eax, dword [edi + 0x10]
or ecx, 0xffffffff
dec eax
cmp eax, ecx
cmovb ecx, eax
lea ecx, [esi + ecx*2]
movzx eax, word [ecx]
cmp ax, dx
jae 0x4048a7
cmp byte [ebp + eax - 0x15f8], 0
jne 0x4048b0
cmp ecx, esi
je 0x404904
sub ecx, 2
jmp 0x404895
sub ecx, esi
sar ecx, 1
jmp 0x404907
mov eax, dword [edi + 0x10]
or ecx, 0xffffffff
dec eax
cmp eax, ecx
cmovb ecx, eax
lea ecx, [esi + ecx*2]
nop word [eax + eax]
movzx esi, word [ecx]
mov edx, 2
mov eax, 0x43931c
nop dword [eax]
cmp word [eax], si
je 0x4048fa
add eax, 2
sub edx, 1
jne 0x4048e0
cmp ecx, dword [ebp - 0x1604]
je 0x404904
sub ecx, 2
jmp 0x4048d0
sub ecx, dword [ebp - 0x1604]
sar ecx, 1
jmp 0x404907
or ecx, 0xffffffff
cmp dword [edi + 0x10], ecx
xorps xmm0, xmm0
movups xmmword [ebp - 0x1444], xmm0
cmovb ecx, dword [edi + 0x10]
mov eax, edi
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x1434], 0
mov dword [ebp - 0x1430], 0
jbe 0x404936
mov eax, dword [edi]
push ecx
push eax
lea ecx, [ebp - 0x1444]
call fcn.00404350
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1444]
cmp dword [ebp - 0x1430], 7
push 0
cmova eax, dword [ebp - 0x1444]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404996
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
je 0x404996
call esi
push eax
push str.Failed_to_create_directory._Error_code:__d_n
call fcn.00404600
add esp, 8
mov byte [ebp - 0x15fd], 0
jmp 0x404b7f
push 0xb0
lea eax, [ebp - 0x14f8]
push 0
push eax
call fcn.0040c010
push edi
lea ecx, [ebp - 0x14f8]
call fcn.00405fe0
mov byte [ebp - 4], 1
cmp dword [ebp - 0x14a8], 0
jne 0x4049dd
cmp dword [edi + 0x14], 7
jbe 0x4049ca
mov edi, dword [edi]
push edi
push str.Failed_to_open_local_file_for_writing._Local_file_path:__s_n
call fcn.00404600
add esp, 8
jmp 0x404b02
push 0x1000
lea eax, [ebp - 0x1428]
push 0
push eax
call fcn.0040c010
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
add esp, 0xc
mov edi, dword [ebp - 0x160c]
mov dword [ebp - 0x142c], 0
nop dword [eax]
lea eax, [ebp - 0x142c]
push eax
push 0x1000
lea eax, [ebp - 0x1428]
push eax
push edi
call esi
test eax, eax
je 0x404abd
mov eax, dword [ebp - 0x142c]
test eax, eax
je 0x404a56
push 0
push eax
lea eax, [ebp - 0x1428]
push eax
lea ecx, [ebp - 0x14f8]
call fcn.00406200
cmp dword [ebp - 0x142c], 0
ja 0x404a10
lea ecx, [ebp - 0x14f4]
call fcn.00407480
test eax, eax
jne 0x404a8e
mov eax, dword [ebp - 0x14f8]
lea ecx, [ebp - 0x14f8]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00401960
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
push dword [ebp - 0x1610]
call esi
push dword [ebp - 0x1608]
call esi
push str.Download_and_save_complete._n
call fcn.00404600
add esp, 4
mov byte [ebp - 0x15fd], 1
jmp 0x404b09
push str.Failed_to_read_data._n
call fcn.00404600
add esp, 4
lea ecx, [ebp - 0x14f4]
call fcn.00407480
test eax, eax
jne 0x404b02
mov eax, dword [ebp - 0x14f8]
lea ecx, [ebp - 0x14f8]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00401960
mov byte [ebp - 0x15fd], 0
mov eax, dword [ebp - 0x14f8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x14f8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x14fc], eax
lea ecx, [ebp - 0x14f4]
call fcn.00405f30
mov eax, dword [ebp - 0x14f8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x14f8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x14fc], eax
lea eax, [ebp - 0x1490]
mov byte [ebp - 4], 4
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00409b49
add esp, 4
mov ecx, dword [ebp - 0x1430]
cmp ecx, 7
jbe 0x404bbb
mov edx, dword [ebp - 0x1444]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x404bb1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404bf0
push ecx
push edx
call fcn.0040a2ad
add esp, 8
mov al, byte [ebp - 0x15fd]
jmp 0x404bd2
push str.Failed_to_send_request_or_receive_response._n
call fcn.00404600
add esp, 4
xor al, al
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.0040a26f
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0040f08f
int3