Function at 0x405173
Capabilities:
Connect to http server
Create http request
Parse url
Read data from internet
Receive data
Resolve function by parsing pe exports
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x888c
call fcn.0041efc0
mov eax, dword [0x447504]
xor eax, esp
mov dword [esp + 0x8888], eax
mov eax, dword [0x456e44]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp eax, edi
mov esi, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], esi
je 0x4051e0
push eax
push ecx
call fcn.0041a3a0
test eax, eax
pop ecx
pop ecx
je 0x4051e0
push dword [esp + 0x10]
push str._HttpDownloader____s__Skipping_for_debug_purposes._n
call fcn.00409ab5
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [esp + 0x8894]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00418a0b
mov esp, ebp
pop ebp
ret
push dword [esp + 0x10]
push str._HttpDownloader____s___1__Starting_download..._n
call fcn.00409ab5
cmp dword [ebp + 0x10], edi
pop ecx
pop ecx
mov dword [esp + 0x1c], edi
push edi
je 0x40520f
cmp esi, edi
jne 0x405208
mov eax, dword [ebx + 0x18]
push dword [eax + 4]
push dword [eax]
jmp 0x405211
push dword [esi + 4]
push dword [esi]
jmp 0x405211
push edi
push edi
push dword [ebp + 8]
push str.JWrapperDownloader
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, edi
mov dword [esp + 0x14], eax
jne 0x405249
push dword [esp + 0x10]
push str._HttpDownloader____s__Unable_initialise_HTTP_connection_n
call fcn.00409ab5
push str.InternetOpen
push str.HttpDownloader
call fcn.00408cfe
add esp, 0x10
jmp 0x4051c9
push 0x3c
pop esi
push esi
lea eax, [esp + 0x58]
push edi
push eax
call fcn.0041a0a0
add esp, 0xc
lea eax, [esp + 0x54]
push eax
push edi
mov dword [esp + 0x5c], esi
push edi
push dword [ebx + 0x10]
xor esi, esi
inc esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x28], edi
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x405381
push 0x400
lea eax, [esp + 0x494]
push edi
push eax
call fcn.0041a0a0
add esp, 0xc
push 0x400
lea eax, [esp + 0x94]
push edi
push eax
call fcn.0041a0a0
add esp, 0xc
cmp dword [esp + 0x68], edi
jbe 0x4052d3
push dword [esp + 0x68]
lea eax, [esp + 0x494]
push dword [esp + 0x68]
push eax
call fcn.00419ea0
add esp, 0xc
cmp dword [esp + 0x84], edi
jbe 0x4052fa
push dword [esp + 0x84]
lea eax, [esp + 0x94]
push dword [esp + 0x84]
push eax
call fcn.00419ea0
add esp, 0xc
cmp dword [esp + 0x60], 4
jne 0x405305
mov dword [esp + 0x18], esi
push edi
push edi
push 3
push edi
push edi
push dword [esp + 0x80]
lea eax, [esp + 0x4a8]
push eax
push dword [esp + 0x30]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x1c], esi
jne 0x40534d
push str.InternetConnect
push str.HttpDownloader
call fcn.00408cfe
push esi
push edi
mov edi, dword [esp + 0x24]
call fcn.00404fc2
jmp 0x405244
cmp dword [esp + 0x18], edi
mov eax, 0x400000
je 0x40535d
mov eax, 0xc00000
push edi
push eax
push edi
push edi
push str.HTTP_1.1
lea eax, [esp + 0xa4]
push eax
push 0x442710
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, str.HttpDownloader
jmp 0x4053a8
push str.CrackURL
mov esi, str.HttpDownloader
push esi
call fcn.00408cfe
pop ecx
pop ecx
push edi
push 0x400800
push edi
push edi
push dword [ebx + 0x10]
push dword [esp + 0x28]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, edi
mov dword [esp + 0xc], eax
jne 0x4053c4
push str.HttpOpenRequest_InternetOpenUrl
push esi
call fcn.00408cfe
push dword [esp + 0x24]
jmp 0x40533e
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x2c]
push eax
push 0x1f
push dword [esp + 0x18]
mov dword [esp + 0x50], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
or dword [esp + 0x28], 0x3180
push 4
lea eax, [esp + 0x2c]
push eax
push 0x1f
push dword [esp + 0x18]
call dword [sym.imp.WININET.dll_InternetSetOptionA]
test eax, eax
jne 0x405419
push str.InternetSetOption
push esi
call fcn.00408cfe
push str._HttpDownloader__Unable_to_set_internet_option_correctly
call fcn.00409ab5
add esp, 0xc
push dword [esp + 0x10]
push str._HttpDownloader____s___3__Starting_download..._n
call fcn.00409ab5
pop ecx
pop ecx
push edi
push edi
push edi
push edi
push dword [esp + 0x1c]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x405453
push str.HttpSendRequest
push esi
call fcn.00408cfe
push dword [esp + 0x24]
push dword [esp + 0x18]
jmp 0x40533f
push dword [esp + 0xc]
call fcn.00404f2a
mov dword [esp + 0x24], eax
pop ecx
lea eax, [esp + 0x38]
push eax
call fcn.0041b940
mov esi, 0x197
cmp dword [esp + 0x24], esi
pop ecx
mov dword [esp + 0x18], edi
jne 0x40552d
cmp dword [esp + 0x18], edi
jne 0x4054a1
push 0xffffffffffffffff
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebx + 0xc], edi
mov dword [esp + 0x18], 1
jne 0x405576
push dword [esp + 0x20]
push dword [esp + 0x14]
push str._HttpDownloader____s__Status_code_is__d_n
call fcn.00409ab5
add esp, 0xc
push edi
push 7
push 0x2eee
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
push eax
push dword [esp + 0x14]
mov dword [esp + 0x2c], eax
push str._HttpDownloader____s__InternetErrorDlg_return_code_is__d_n
call fcn.00409ab5
add esp, 0xc
cmp dword [esp + 0x24], 0x2f00
jne 0x4055a6
push edi
push edi
push edi
push edi
push dword [esp + 0x1c]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
push dword [esp + 0xc]
call fcn.00404f2a
cmp eax, esi
pop ecx
mov dword [esp + 0x20], eax
je 0x40547f
cmp dword [esp + 0x18], edi
je 0x40552d
push dword [ebx + 4]
mov dword [ebx + 0xc], 1
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esp + 0x10]
push str._HttpDownloader____s__Connection_setup__querying_length_n
call fcn.00409ab5
push dword [esp + 0x14]
call fcn.00404f67
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], edi
je 0x4055c9
push esi
push dword [esp + 0x14]
mov dword [esp + 0x20], 1
push str._HttpDownloader____s__Required_file_size_is__d_n
mov dword [esp + 0x3c], esi
call fcn.00409ab5
add esp, 0xc
jmp 0x4055d9
push dword [esp + 0x10]
push str._HttpDownloader____s__Proxy_thread_returning_as_another_has_connected_to_the_proxy_n
call fcn.00409ab5
push dword [esp + 0x24]
mov edi, dword [esp + 0x20]
push dword [esp + 0x18]
call fcn.00404fc2
add esp, 0x10
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x4051c9
push dword [ebx + 4]
mov dword [ebx + 0xc], 1
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esp + 0x10]
push str._HttpDownloader____s__Could_not_get_proxy_credentials._n
call fcn.00409ab5
jmp 0x405446
push dword [esp + 0x10]
push str._HttpDownloader____s__Required_file_size_is_unknown__n
call fcn.00409ab5
pop ecx
pop ecx
push 0x8000
lea eax, [esp + 0x894]
push edi
push eax
mov dword [esp + 0x40], edi
call fcn.0041a0a0
lea eax, [esp + 0x54]
add esp, 0xc
push eax
call fcn.0041b940
cmp dword [esp + 0x1c], edi
pop ecx
mov dword [esp + 0x24], edi
je 0x405628
cmp esi, edi
je 0x4057ea
cmp dword [esp + 0x18], edi
je 0x405628
mov eax, esi
imul eax, eax, 0x64
cdq
idiv dword [esp + 0x30]
push 0x64
pop ecx
sub ecx, eax
push ecx
jmp 0x40562a
push 0xffffffffffffffff
call fcn.00407948
lea eax, [esp + 0x20]
push eax
push 0x8000
lea eax, [esp + 0x898]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4057db
sub esi, dword [esp + 0x20]
cmp dword [esp + 0x20], edi
mov dword [esp + 0x44], esi
jbe 0x405761
cmp dword [esp + 0x34], edi
jne 0x405747
push 0xffffffffffffffff
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [esp + 0x10]
push esi
push str._HttpDownloader____s__Download_is_now_active._n
call fcn.00409ab5
cmp dword [ebx + 8], edi
pop ecx
pop ecx
jne 0x4057b5
xor eax, eax
inc eax
push eax
push esi
push str._HttpDownloader____s__Opened_file._Set_downloadWorked_to_TRUE___d__n
mov dword [esp + 0x40], eax
mov dword [ebx + 8], eax
call fcn.00409ab5
add esp, 0xc
cmp dword [ebp + 0x10], edi
push esi
je 0x4056e4
cmp dword [esp + 0x30], edi
jne 0x4056c7
push str._HttpDownloader____s__Copying_proxy_settings._n
call fcn.00409ab5
mov eax, dword [ebx + 0x18]
jmp 0x4056d5
push str._HttpDownloader____s__Using_override_proxy_settings._n
call fcn.00409ab5
mov eax, dword [esp + 0x34]
push dword [eax + 4]
push dword [eax]
call fcn.00404fe6
add esp, 0x10
jmp 0x405732
push str._HttpDownloader____s__No_proxy_settings_detected._n
call fcn.00409ab5
push str.Proxy_Non_Auto
push esi
call fcn.0041a3a0
add esp, 0x10
test eax, eax
jne 0x405728
cmp dword [0x456dd8], edi
jne 0x405728
cmp dword [ebx + 0x18], edi
je 0x405728
push esi
push str._HttpDownloader____s___Special_Case__No_existing_proxy_settings_found._n
call fcn.00409ab5
mov eax, dword [ebx + 0x18]
push dword [eax + 4]
push dword [eax]
call fcn.00404fe6
add esp, 0x10
push dword [esp + 0x14]
call fcn.0040507a
pop ecx
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
push str._HttpDownloader____s__Starting_to_write_data_to_file..._n
call fcn.00409ab5
pop ecx
pop ecx
push dword [esp + 0x20]
mov esi, dword [ebx + 0x14]
lea eax, [esp + 0x894]
push eax
call fcn.004064b6
mov esi, dword [esp + 0x4c]
jmp 0x405777
push dword [esp + 0x10]
push str._HttpDownloader____s__Read_0_bytes_so_finishing._n
call fcn.00409ab5
mov dword [esp + 0x2c], 1
cmp dword [esp + 0x2c], edi
pop ecx
pop ecx
je 0x405610
cmp esi, edi
jle 0x4057ea
push esi
push dword [esp + 0x14]
push str._HttpDownloader____s__Warning:_download_complete_but_required_length_is_still__d._n
call fcn.00409ab5
add esp, 0xc
xor esi, esi
push dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
push dword [esp + 0x10]
call fcn.00404fc2
pop ecx
pop ecx
mov eax, esi
jmp 0x4051cb
push esi
push str._HttpDownloader____s__Thread_returning_as_another_has_worked_n
call fcn.00409ab5
push dword [esp + 0x24]
mov edi, dword [esp + 0x20]
push dword [esp + 0x18]
call fcn.00404fc2
add esp, 0x10
push dword [ebx]
jmp 0x40559b
push 0x442b80
push str.HttpDownloader
jmp 0x405441
lea eax, [esp + 0x38]
push eax
call fcn.0041b940
pop ecx
push dword [esp + 0x4c]
push dword [esp + 0x4c]
push dword [esp + 0x44]
push dword [esp + 0x44]
call fcn.0041bfd3
pop ecx
pop ecx
fstp qword [esp]
push dword [esp + 0x18]
push str._HttpDownloader____s__Closing_buffer...__download_took__lf__n
call fcn.00409ab5
mov esi, dword [ebx + 0x14]
add esp, 0x10
call fcn.00406447
push 0x64
call fcn.00407948
push dword [ebx + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor esi, esi
inc esi
jmp 0x40579b