Function at 0x406484
Capabilities:
Connect to http server
Create http request
Download and write a file
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x89e8
call fcn.004379e0
sub rsp, rax
mov rdx, qword [0x0054b330]
xor edi, edi
mov ebx, r8d
cmp rdx, rdi
mov rsi, rcx
je 0x4064d1
call fcn.00417fe0
cmp eax, edi
je 0x4064d1
lea rcx, str._HttpDownloader____s__Skipping_for_debug_purposes._n
mov rdx, rsi
call fcn.00409ce0
xor eax, eax
jmp 0x406ce3
lea rcx, str._HttpDownloader____s___1__Starting_download..._n
mov rdx, rsi
call fcn.00409ce0
cmp dword [rsp + 0x8a58], edi
mov rbp, qword [rsp + 0x8a50]
mov r14, rdi
mov dword [rsp + 0x20], edi
mov edx, ebx
lea rcx, str.JWrapperDownloader
je 0x406524
mov rax, qword [rsp + 0x8a60]
cmp rax, rdi
jne 0x40651b
mov r8, qword [rbp + 0x28]
mov r9, qword [r8 + 8]
mov r8, qword [r8]
jmp 0x40652a
mov r9, qword [rax + 8]
mov r8, qword [rax]
jmp 0x40652a
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rdx, rsi
cmp rax, rdi
mov r12, rax
jne 0x406558
lea rcx, str._HttpDownloader____s__Unable_initialise_HTTP_connection_n
call fcn.00409ce0
lea rcx, str.InternetOpen
call fcn.004061fc
jmp 0x4064ca
lea rcx, str._HttpDownloader____s__Attempting_to_crack_URL_n
call fcn.00409ce0
mov ebx, 0x68
lea rcx, [rsp + 0x70]
mov r8, rbx
xor edx, edx
call fcn.00417ae0
mov rcx, qword [rbp + 0x18]
lea eax, [rbx - 0x67]
lea r9, [rsp + 0x70]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x90], eax
mov dword [rsp + 0xc0], eax
mov dword [rsp + 0x70], ebx
call qword [sym.imp.WININET.dll_InternetCrackUrlA]
lea rcx, str._HttpDownloader____s__Crack_result_is__d_n
mov rdx, rsi
mov r8d, eax
mov ebx, eax
call fcn.00409ce0
cmp ebx, edi
je 0x4066fb
mov ebx, 0x400
lea rcx, [rsp + 0x5e0]
xor edx, edx
mov r8, rbx
call fcn.00417ae0
lea rcx, [rsp + 0x1e0]
mov r8, rbx
xor edx, edx
call fcn.00417ae0
cmp dword [rsp + 0x90], edi
jbe 0x40660c
mov r8d, dword [rsp + 0x90]
mov rdx, qword [rsp + 0x88]
lea rcx, [rsp + 0x5e0]
call fcn.004176e0
cmp dword [rsp + 0xc0], edi
jbe 0x406632
mov r8d, dword [rsp + 0xc0]
mov rdx, qword [rsp + 0xb8]
lea rcx, [rsp + 0x1e0]
call fcn.004176e0
lea rdx, [rsp + 0x5e0]
lea rcx, str._HttpDownloader__Hostname___s_n
call fcn.00409ce0
movzx edx, word [rsp + 0x94]
lea rcx, str._HttpDownloader__nPort___d_n
call fcn.00409ce0
lea rdx, [rsp + 0x1e0]
lea rcx, str._HttpDownloader__lpszUrlPath___s_n
call fcn.00409ce0
movzx r8d, word [rsp + 0x94]
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], edi
lea rdx, [rsp + 0x5e0]
xor r9d, r9d
mov rcx, r12
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_InternetConnectA]
cmp rax, rdi
mov r14, rax
jne 0x4066c7
lea rcx, str.InternetConnect
call fcn.004061fc
xor edx, edx
mov r8, r14
mov rcx, r12
call fcn.004062f0
jmp 0x4064ca
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 0x400000
lea r8, [rsp + 0x1e0]
lea rdx, [0x0043f888]
xor r9d, r9d
mov rcx, rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
jmp 0x406727
lea rcx, str.CrackURL
call fcn.004061fc
mov rdx, qword [rbp + 0x18]
xor r9d, r9d
xor r8d, r8d
mov rcx, r12
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0x400800
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp rax, rdi
mov r13, rax
jne 0x40673b
lea rcx, str.HttpOpenRequest_InternetOpenUrl
jmp 0x4066b0
lea rcx, str._HttpDownloader____s___3__Starting_download..._n
mov rdx, rsi
call fcn.00409ce0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r13
mov dword [rsp + 0x20], edi
call qword [sym.imp.WININET.dll_HttpSendRequestA]
mov rcx, r13
call fcn.004062a0
lea rcx, [rsp + 0x58]
mov ebx, eax
call fcn.0041a590
lea rcx, str._HttpDownloader____s___4__Starting_download..._n
mov rdx, rsi
call fcn.00409ce0
cmp ebx, 0x197
mov r15d, edi
jne 0x40684a
cmp r15d, edi
jne 0x4067b4
mov rcx, qword [rbp + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rbp + 0x14], edi
mov r15d, 1
jne 0x406896
lea rcx, str._HttpDownloader____s__Status_code_is__d_n
mov r8d, ebx
mov rdx, rsi
call fcn.00409ce0
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov r9d, 7
mov r8d, 0x2eee
mov rdx, r13
mov rcx, rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_InternetErrorDlg]
lea rcx, str._HttpDownloader____s__InternetErrorDlg_return_code_is__d_n
mov r8d, eax
mov rdx, rsi
mov ebx, eax
call fcn.00409ce0
cmp ebx, 0x2f00
jne 0x4068c2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r13
mov dword [rsp + 0x20], edi
call qword [sym.imp.WININET.dll_HttpSendRequestA]
mov rcx, r13
call fcn.004062a0
cmp eax, 0x197
mov ebx, eax
je 0x406791
cmp r15d, edi
je 0x40684a
mov rcx, qword [rbp + 8]
mov eax, 1
mov dword [rbp + 0x14], eax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rcx, str._HttpDownloader____s__Connection_setup__querying_length_n
mov rdx, rsi
call fcn.00409ce0
lea r9, [rsp + 0x50]
lea r8, [rsp + 0xe0]
mov edx, 5
mov rcx, r13
mov dword [rsp + 0x50], 0x100
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp eax, edi
je 0x4068eb
lea rcx, [rsp + 0xe0]
call fcn.00417300
mov ebx, eax
jmp 0x4068f0
lea rcx, str._HttpDownloader____s__Proxy_thread_returning_as_another_has_connected_to_the_proxy_n
mov rdx, rsi
call fcn.00409ce0
mov r8, r14
mov rdx, r13
mov rcx, r12
call fcn.004062f0
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x4064ca
mov rcx, qword [rbp + 8]
mov eax, 1
mov dword [rbp + 0x14], eax
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rcx, str._HttpDownloader____s__Could_not_get_proxy_credentials._n
mov rdx, rsi
call fcn.00409ce0
mov rdx, r13
jmp 0x4066b7
mov ebx, 0xffffffff
cmp ebx, 0xffffffff
mov dword [rsp + 0x44], edi
mov r15d, edi
mov rdx, rsi
je 0x40691a
lea rcx, str._HttpDownloader____s__Required_file_size_is__d_n
mov r8d, ebx
mov r15d, 1
mov dword [rsp + 0x44], ebx
call fcn.00409ce0
jmp 0x406926
lea rcx, str._HttpDownloader____s__Required_file_size_is_unknown__n
call fcn.00409ce0
lea rcx, [rsp + 0x9e0]
xor edx, edx
mov r8d, 0x8000
mov qword [rsp + 0x48], rdi
call fcn.00417ae0
lea rcx, [rsp + 0x68]
call fcn.0041a590
cmp r15d, edi
mov eax, edi
mov dword [rsp + 0x40], edi
je 0x406963
cmp ebx, edi
mov ecx, 1
cmove eax, ecx
mov dword [rsp + 0x40], eax
cmp eax, edi
movsxd rcx, r15d
mov qword [rsp + 0x60], rcx
jne 0x406c0d
mov r15d, dword [rsp + 0x40]
lea rcx, str._HttpDownloader____s__Looping..._n
mov rdx, rsi
call fcn.00409ce0
cmp qword [rsp + 0x60], rdi
lea rcx, [0x004481b0]
je 0x4069a8
mov eax, ebx
imul eax, eax, 0x64
cdq
idiv dword [rsp + 0x44]
mov edx, 0x64
sub edx, eax
jmp 0x4069ad
mov edx, 0xffffffff
call fcn.00409084
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x9e0]
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, edi
je 0x406c60
mov r8d, dword [rsp + 0x40]
lea rcx, str._HttpDownloader____s__Read__d..._n
mov rdx, rsi
call fcn.00409ce0
mov r11d, dword [rsp + 0x40]
sub ebx, r11d
cmp r11d, edi
jbe 0x406bef
mov r9, qword [rsp + 0x48]
cmp r9, rdi
jne 0x406bd8
mov rcx, qword [rbp]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, str._HttpDownloader____s__OutputFile_needs_initialising._n
mov rdx, rsi
call fcn.00409ce0
cmp dword [rbp + 0x10], edi
jne 0x406c3a
mov rdx, qword [rbp + 0x20]
lea r8, [0x0043fb90]
lea rcx, [rsp + 0x48]
call fcn.00417660
mov rdx, rsi
cmp eax, edi
jne 0x406c28
mov eax, 1
lea rcx, str._HttpDownloader____s__Opened_file._Set_downloadWorked_to_TRUE___d__n
mov r8d, eax
mov dword [rbp + 0x10], eax
call fcn.00409ce0
cmp dword [rsp + 0x8a58], edi
mov rdx, rsi
je 0x406b34
lea rcx, str._HttpDownloader____s__Copying_proxy_settings._n
call fcn.00409ce0
cmp qword [0x0054b268], rdi
mov rdx, rsi
je 0x406aa0
lea rcx, str._HttpDownloader____s__Proxy_settings_exist_already._n
call fcn.00409ce0
jmp 0x406bb5
lea rcx, str._HttpDownloader____s__No_existing_proxy_settings_found._n
call fcn.00409ce0
mov ecx, 0x10
call fcn.00414e40
xor edx, edx
lea r8d, [rdx + 0x10]
mov rcx, rax
mov qword [0x0054b268], rax
call fcn.00417ae0
cmp qword [rsp + 0x8a60], rdi
mov rdx, rsi
jne 0x406b06
lea rcx, str._HttpDownloader____s__Copying_proxy_settings._n
call fcn.00409ce0
mov rax, qword [rbp + 0x28]
mov rdx, qword [0x0054b268]
mov rcx, qword [rax]
mov qword [rdx], rcx
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 8]
mov qword [rdx + 8], rcx
jmp 0x406bb5
lea rcx, str._HttpDownloader____s__Using_override_proxy_settings._n
call fcn.00409ce0
mov rax, qword [rsp + 0x8a60]
mov rcx, qword [0x0054b268]
mov r11, qword [rax]
mov qword [rcx], r11
mov rax, qword [rax + 8]
mov qword [rcx + 8], rax
jmp 0x406bb5
lea rcx, str._HttpDownloader____s__No_proxy_settings_detected._n
call fcn.00409ce0
lea rdx, str.Proxy_Non_Auto
mov rcx, rsi
call fcn.00417fe0
cmp eax, edi
jne 0x406bad
cmp qword [0x0054b268], rdi
jne 0x406bad
cmp qword [rbp + 0x28], rdi
je 0x406bad
lea rcx, str._HttpDownloader____s___Special_Case__No_existing_proxy_settings_found._n
mov rdx, rsi
call fcn.00409ce0
mov ecx, 0x10
call fcn.00414e40
xor edx, edx
lea r8d, [rdx + 0x10]
mov rcx, rax
mov qword [0x0054b268], rax
call fcn.00417ae0
mov r11, qword [rbp + 0x28]
mov rdx, qword [0x0054b268]
mov rax, qword [r11]
mov qword [rdx], rax
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 8]
mov qword [rdx + 8], rcx
mov rcx, r12
call fcn.00406330
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rcx, str._HttpDownloader____s__Starting_to_write_data_to_file..._n
mov rdx, rsi
call fcn.00409ce0
mov r9, qword [rsp + 0x48]
mov r11d, dword [rsp + 0x40]
lea rcx, [rsp + 0x9e0]
mov r8d, r11d
mov edx, 1
call fcn.00419660
jmp 0x406c04
lea rcx, str._HttpDownloader____s__Read_0_bytes_so_finishing._n
mov rdx, rsi
call fcn.00409ce0
mov r15d, 1
cmp r15d, edi
je 0x406978
cmp ebx, edi
jle 0x406c71
lea rcx, str._HttpDownloader____s__Warning:_download_complete_but_required_length_is_still__d._n
mov r8d, ebx
mov rdx, rsi
call fcn.00409ce0
jmp 0x406cd3
mov r8, qword [rbp + 0x20]
lea rcx, str._Error____s__The_file__s_was_not_opened_n
call fcn.00409ce0
jmp 0x406c49
lea rcx, str._HttpDownloader____s__Thread_returning_as_another_has_worked_n
mov rdx, rsi
call fcn.00409ce0
mov r8, r14
mov rdx, r13
mov rcx, r12
call fcn.004062f0
mov rcx, qword [rbp]
jmp 0x4068b7
lea rcx, [0x0043fe00]
call fcn.004061fc
jmp 0x4068e3
lea rcx, [rsp + 0x58]
call fcn.0041a590
cmp qword [rsp + 0x48], rdi
je 0x406cce
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
call fcn.0041b0b0
lea rcx, str._HttpDownloader____s__Closing_file...__download_took__lf__n
mov rdx, rsi
movsd xmm2, xmm0
movq r8, xmm2
call fcn.00409ce0
mov rcx, qword [rsp + 0x48]
call fcn.0041a4e0
lea rcx, [0x004481b0]
mov edx, 0x64
call fcn.00409084
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, 1
mov r8, r14
mov rdx, r13
mov rcx, r12
call fcn.004062f0
mov eax, edi
add rsp, 0x89e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret