Function at 0x4053d1
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 ebp
mov ebp, esp
mov eax, 0x887c
call fcn.0041bf60
mov eax, dword [0x435504]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
push str._HttpDownloader____s___1__Starting_download..._n
mov esi, ecx
mov dword [ebp - 0x8828], eax
call fcn.00407f5c
pop ecx
xor edi, edi
cmp dword [ebp + 0x10], edi
pop ecx
mov dword [ebp - 0x881c], edi
push edi
je 0x405428
mov eax, dword [ebp - 0x8828]
cmp eax, edi
jne 0x405421
mov eax, dword [esi + 0x18]
push dword [eax + 4]
push dword [eax]
jmp 0x40542a
push edi
push edi
push dword [ebp + 0xc]
push str.JWrapperDownloader
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, edi
mov dword [ebp - 0x8810], eax
push ebx
jne 0x40546b
push str._HttpDownloader____s__Unable_initialise_HTTP_connection_n
call fcn.00407f5c
push str.InternetOpen
call fcn.00405231
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416994
leave
ret
push str._HttpDownloader____s__Attempting_to_crack_URL_n
call fcn.00407f5c
push 0x3c
lea eax, [ebp - 0x887c]
push edi
push eax
call fcn.00418920
xor eax, eax
inc eax
add esp, 0x14
mov dword [ebp - 0x8868], eax
mov dword [ebp - 0x884c], eax
lea eax, [ebp - 0x887c]
push eax
push edi
push edi
push dword [esi + 0x10]
mov dword [ebp - 0x887c], 0x3c
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push eax
push ebx
push str._HttpDownloader____s__Crack_result_is__d_n
mov dword [ebp - 0x8820], eax
call fcn.00407f5c
add esp, 0xc
cmp dword [ebp - 0x8820], edi
je 0x4055e5
push 0x400
lea eax, [ebp - 0x808]
push edi
push eax
call fcn.00418920
add esp, 0xc
push 0x400
lea eax, [ebp - 0x408]
push edi
push eax
call fcn.00418920
add esp, 0xc
cmp dword [ebp - 0x8868], edi
jbe 0x405520
push dword [ebp - 0x8868]
lea eax, [ebp - 0x808]
push dword [ebp - 0x886c]
push eax
call fcn.00418670
add esp, 0xc
cmp dword [ebp - 0x884c], edi
jbe 0x405543
push dword [ebp - 0x884c]
lea eax, [ebp - 0x408]
push dword [ebp - 0x8850]
push eax
call fcn.00418670
add esp, 0xc
lea eax, [ebp - 0x808]
push eax
push str._HttpDownloader__Hostname___s_n
call fcn.00407f5c
movzx eax, word [ebp - 0x8864]
push eax
push str._HttpDownloader__nPort___d_n
call fcn.00407f5c
lea eax, [ebp - 0x408]
push eax
push str._HttpDownloader__lpszUrlPath___s_n
call fcn.00407f5c
add esp, 0x18
push edi
push edi
push 3
push edi
push edi
push dword [ebp - 0x8864]
lea eax, [ebp - 0x808]
push eax
push dword [ebp - 0x8810]
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, edi
mov dword [ebp - 0x881c], eax
jne 0x4055c7
push str.InternetConnect
call fcn.00405231
pop ecx
push dword [ebp - 0x881c]
push edi
mov edi, dword [ebp - 0x8810]
call fcn.004053ad
pop ecx
pop ecx
jmp 0x40545a
push edi
push 0x400000
push edi
push edi
push edi
lea ecx, [ebp - 0x408]
push ecx
push 0x431a80
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
jmp 0x405607
push str.CrackURL
call fcn.00405231
pop ecx
push edi
push 0x400800
push edi
push edi
push dword [esi + 0x10]
push dword [ebp - 0x8810]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, edi
mov dword [ebp - 0x880c], eax
jne 0x405618
push str.HttpOpenRequest_InternetOpenUrl
jmp 0x4055a8
push ebx
push str._HttpDownloader____s___3__Starting_download..._n
call fcn.00407f5c
pop ecx
pop ecx
push edi
push edi
push edi
push edi
push dword [ebp - 0x880c]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
push dword [ebp - 0x880c]
call fcn.00405315
mov dword [ebp - 0x8818], eax
pop ecx
lea eax, [ebp - 0x8838]
push eax
call fcn.0041a401
pop ecx
push ebx
push str._HttpDownloader____s___4__Starting_download..._n
call fcn.00407f5c
cmp dword [ebp - 0x8818], 0x197
pop ecx
pop ecx
mov dword [ebp - 0x8814], edi
jne 0x405736
cmp dword [ebp - 0x8814], edi
jne 0x40569d
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [esi + 0xc], edi
mov dword [ebp - 0x8814], 1
jne 0x40578b
push dword [ebp - 0x8818]
push ebx
push str._HttpDownloader____s__Status_code_is__d_n
call fcn.00407f5c
add esp, 0xc
push edi
push 7
push 0x2eee
push dword [ebp - 0x880c]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
push eax
push ebx
push str._HttpDownloader____s__InternetErrorDlg_return_code_is__d_n
mov dword [ebp - 0x8820], eax
call fcn.00407f5c
add esp, 0xc
cmp dword [ebp - 0x8820], 0x2f00
jne 0x4057be
push edi
push edi
push edi
push edi
push dword [ebp - 0x880c]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
push dword [ebp - 0x880c]
call fcn.00405315
cmp eax, 0x197
pop ecx
mov dword [ebp - 0x8818], eax
je 0x405677
cmp dword [ebp - 0x8814], edi
je 0x405736
push dword [esi + 4]
mov dword [esi + 0xc], 1
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
push str._HttpDownloader____s__Connection_setup__querying_length_n
call fcn.00407f5c
push dword [ebp - 0x880c]
call fcn.00405352
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x8814], eax
mov dword [ebp - 0x8830], edi
mov dword [ebp - 0x882c], edi
je 0x4057f8
push eax
push ebx
push str._HttpDownloader____s__Required_file_size_is__d_n
mov dword [ebp - 0x882c], 1
mov dword [ebp - 0x8830], eax
call fcn.00407f5c
add esp, 0xc
jmp 0x405805
push ebx
push str._HttpDownloader____s__Proxy_thread_returning_as_another_has_connected_to_the_proxy_n
call fcn.00407f5c
push dword [ebp - 0x881c]
mov edi, dword [ebp - 0x8810]
push dword [ebp - 0x880c]
call fcn.004053ad
add esp, 0x10
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40545a
push dword [esi + 4]
mov dword [esi + 0xc], 1
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
push str._HttpDownloader____s__Could_not_get_proxy_credentials._n
call fcn.00407f5c
push dword [ebp - 0x881c]
mov edi, dword [ebp - 0x8810]
push dword [ebp - 0x880c]
call fcn.004053ad
add esp, 0x10
jmp 0x40545a
push ebx
push str._HttpDownloader____s__Required_file_size_is_unknown__n
call fcn.00407f5c
pop ecx
pop ecx
push 0x8000
lea eax, [ebp - 0x8808]
push edi
push eax
mov dword [ebp - 0x8818], edi
call fcn.00418920
lea eax, [ebp - 0x8840]
add esp, 0xc
push eax
call fcn.0041a401
cmp dword [ebp - 0x882c], edi
pop ecx
mov dword [ebp - 0x8820], edi
je 0x405847
cmp dword [ebp - 0x8814], edi
je 0x405abb
push ebx
push str._HttpDownloader____s__Looping..._n
call fcn.00407f5c
cmp dword [ebp - 0x882c], edi
pop ecx
pop ecx
je 0x405874
mov eax, dword [ebp - 0x8814]
imul eax, eax, 0x64
cdq
idiv dword [ebp - 0x8830]
push 0x64
pop ecx
sub ecx, eax
push ecx
jmp 0x405876
push 0xffffffffffffffff
call fcn.004074ef
lea eax, [ebp - 0x8824]
push eax
push 0x8000
lea eax, [ebp - 0x8808]
push eax
push dword [ebp - 0x880c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x405a9f
push dword [ebp - 0x8824]
push ebx
push str._HttpDownloader____s__Read__d..._n
call fcn.00407f5c
mov eax, dword [ebp - 0x8824]
sub dword [ebp - 0x8814], eax
add esp, 0xc
cmp eax, edi
jbe 0x4059e2
cmp dword [ebp - 0x8818], edi
jne 0x4059c3
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push str._HttpDownloader____s__OutputFile_needs_initialising._n
call fcn.00407f5c
cmp dword [esi + 8], edi
pop ecx
pop ecx
jne 0x405a47
push 0x431d68
push dword [esi + 0x14]
lea eax, [ebp - 0x8818]
push eax
call fcn.0041861c
add esp, 0xc
test eax, eax
jne 0x405a73
inc eax
push eax
push ebx
push str._HttpDownloader____s__Opened_file._Set_downloadWorked_to_TRUE___d__n
mov dword [esi + 8], eax
call fcn.00407f5c
add esp, 0xc
cmp dword [ebp + 0x10], edi
push ebx
je 0x40599c
push str._HttpDownloader____s__Copying_proxy_settings._n
call fcn.00407f5c
push 8
call fcn.00416a80
add esp, 0xc
push 8
push edi
push eax
mov dword [0x444da4], eax
call fcn.00418920
add esp, 0xc
cmp dword [ebp - 0x8828], edi
push ebx
jne 0x405979
push str._HttpDownloader____s__Copying_proxy_settings._n
call fcn.00407f5c
mov eax, dword [esi + 0x18]
pop ecx
pop ecx
mov ecx, dword [eax]
mov eax, dword [0x444da4]
mov dword [eax], ecx
mov ecx, dword [esi + 0x18]
jmp 0x405994
push str._HttpDownloader____s__Using_override_proxy_settings._n
call fcn.00407f5c
mov eax, dword [0x444da4]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8828]
mov edx, dword [ecx]
mov dword [eax], edx
mov ecx, dword [ecx + 4]
mov dword [eax + 4], ecx
jmp 0x4059ae
push str._HttpDownloader____s__No_proxy_settings_detected._n
call fcn.00407f5c
pop ecx
pop ecx
mov dword [0x444da4], edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
push str._HttpDownloader____s__Starting_to_write_data_to_file..._n
call fcn.00407f5c
pop ecx
pop ecx
push dword [ebp - 0x8818]
lea eax, [ebp - 0x8808]
push dword [ebp - 0x8824]
push 1
push eax
call fcn.004199bc
add esp, 0x10
jmp 0x4059f9
push ebx
push str._HttpDownloader____s__Read_0_bytes_so_finishing._n
call fcn.00407f5c
pop ecx
pop ecx
mov dword [ebp - 0x8820], 1
cmp dword [ebp - 0x8820], edi
je 0x405847
cmp dword [ebp - 0x8814], edi
jle 0x405abb
push dword [ebp - 0x8814]
push ebx
push str._HttpDownloader____s__Warning:_download_complete_but_required_length_is_still__d._n
call fcn.00407f5c
add esp, 0xc
xor esi, esi
push dword [ebp - 0x881c]
mov edi, dword [ebp - 0x8810]
push dword [ebp - 0x880c]
call fcn.004053ad
pop ecx
pop ecx
mov eax, esi
jmp 0x40545c
push ebx
push str._HttpDownloader____s__Thread_returning_as_another_has_worked_n
call fcn.00407f5c
push dword [ebp - 0x881c]
mov edi, dword [ebp - 0x8810]
push dword [ebp - 0x880c]
call fcn.004053ad
add esp, 0x10
push dword [esi]
jmp 0x4057b3
push dword [esi + 0x14]
push ebx
push str._Error____s__The_file__s_was_not_opened_n
call fcn.00407f5c
mov edi, dword [ebp - 0x8810]
add esp, 0xc
push dword [ebp - 0x881c]
push dword [ebp - 0x880c]
call fcn.004053ad
pop ecx
pop ecx
jmp 0x405a6c
push 0x431ee8
call fcn.00405231
pop ecx
push dword [ebp - 0x881c]
push dword [ebp - 0x880c]
jmp 0x4055b5
lea eax, [ebp - 0x8838]
push eax
call fcn.0041a401
cmp dword [ebp - 0x8818], edi
pop ecx
je 0x405b1b
push dword [ebp - 0x883c]
push dword [ebp - 0x8840]
push dword [ebp - 0x8834]
push dword [ebp - 0x8838]
call fcn.0041aa93
pop ecx
pop ecx
fstp qword [esp]
push ebx
push str._HttpDownloader____s__Closing_file...__download_took__lf__n
call fcn.00407f5c
push dword [ebp - 0x8818]
call fcn.0041a385
add esp, 0x14
push 0x64
call fcn.004074ef
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor esi, esi
inc esi
jmp 0x405a27