Function at 0x401e78
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get common file path
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Reference http user-agent string
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2984
call fcn.0041be40
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
push edi
mov dword [ebp - 0x1c], ebx
je 0x40222a
cmp word [esi], bx
je 0x40222a
push 0xe
xor eax, eax
pop ecx
lea edi, [ebp - 0x6c]
push 0x7f
mov word [ebp - 0x984], bx
rep stosd dword es:[edi], eax
pop edx
lea edi, [ebp - 0x982]
mov ecx, edx
push 0x3f
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x984]
pop ecx
mov dword [ebp - 0x60], eax
xor eax, eax
lea edi, [ebp - 0x372]
mov word [ebp - 0x374], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x374]
push 0x3f
mov dword [ebp - 0x54], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x272]
mov word [ebp - 0x274], bx
mov word [ebp - 0x2984], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x274]
mov ecx, 0x3ff
mov dword [ebp - 0x4c], eax
xor eax, eax
lea edi, [ebp - 0x2982]
mov dword [ebp - 0x70], 0x3c
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x2984]
mov dword [ebp - 0x5c], 0xff
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x70]
push eax
push ebx
push ebx
push esi
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x40], 0x7ff
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x40222a
cmp dword [ebp - 0x64], 3
je 0x401f69
cmp dword [ebp - 0x64], 4
jne 0x40222a
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x173]
mov byte [ebp - 0x174], bl
mov dword [ebp - 0x24], 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x174]
push eax
push ebx
call sub.urlmon.dll_ObtainUserAgentString
push 4
lea eax, [ebp - 0x28]
pop esi
mov dword [ebp + 8], ebx
push eax
lea eax, [ebp + 8]
push eax
push 0x49
push ebx
mov dword [ebp - 0x28], esi
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
inc dword [ebp + 8]
lea eax, [ebp + 8]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push eax
push 0x49
push ebx
call esi
cmp byte [ebp - 0x174], bl
mov dword [ebp - 0x34], 0x4222b8
mov dword [ebp - 0x30], ebx
lea eax, [ebp - 0x174]
jne 0x401fe1
mov eax, str.Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_6.1__Trident_4.0_
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp dword [ebp + 0xc], ebx
push 4
mov dword [ebp - 0xc], eax
pop edi
je 0x402019
lea ecx, [ebp + 0xc]
push edi
push ecx
push 2
push eax
call esi
lea eax, [ebp + 0xc]
push edi
push eax
push 5
push dword [ebp - 0xc]
call esi
lea eax, [ebp + 0xc]
push edi
push eax
push 6
push dword [ebp - 0xc]
call esi
push ebx
push ebx
push 3
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push dword [ebp - 0x60]
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x14], eax
xor eax, eax
cmp dword [ebp - 0x64], edi
jne 0x402041
mov eax, 0x803000
or eax, 0x84000100
push ebx
push eax
lea eax, [ebp - 0x34]
push eax
push ebx
push str.HTTP_1.1
push dword [ebp - 0x44]
push 0x42225c
push dword [ebp - 0x14]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
lea ecx, [ebp - 0x2c]
push edi
push ecx
push 0x41
push eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x2c], 1
call esi
test eax, eax
mov dword [ebp - 4], str.Pragma:_no_cache_r_nCache_Control:_no_cache_r_nAccept_Encoding:_gzip__deflate
jne 0x402089
mov dword [ebp - 4], str.Pragma:_no_cache_r_nCache_Control:_no_cache
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
cmp eax, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x20], edi
je 0x402202
lea eax, [ebp - 0x20]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20000013
push dword [ebp - 8]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x402202
cmp dword [ebp - 0x10], 0xc8
jne 0x402202
mov edx, 0x81
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x57a]
mov word [ebp - 0x57c], bx
mov word [ebp - 0x784], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x782]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x784]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x402141
lea eax, [ebp - 0x57c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x784]
push str.JuziBrowser
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x57c]
push 0x422134
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
je 0x402202
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x1983]
mov byte [ebp - 0x1984], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1984]
push 0x1000
push eax
push dword [ebp - 8]
mov dword [ebp - 4], ebx
call edi
test eax, eax
je 0x4021cc
cmp dword [ebp - 4], ebx
je 0x4021cc
push dword [ebp - 0x18]
lea eax, [ebp - 0x1984]
push 1
push dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1984]
push 0x1000
push eax
push dword [ebp - 8]
jmp 0x402194
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll_fclose]
cmp dword [ebp + 0x10], ebx
pop ecx
je 0x4021fb
cmp dword [ebp + 0x14], ebx
je 0x4021fb
lea eax, [ebp - 0x57c]
push eax
push 0x4220a0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
mov dword [ebp - 0x1c], 1
push dword [ebp - 8]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push dword [ebp - 0x14]
call edi
push dword [ebp - 0xc]
call edi
dec dword [ebp + 8]
lea eax, [ebp + 8]
push 4
push eax
push 0x49
push ebx
call esi
mov eax, dword [ebp - 0x1c]
jmp 0x40222c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret