Function at 0x413d60
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
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
sub esp, 0xac4
mov eax, dword [0x45066c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov dword [ebp - 0xab8], eax
mov eax, dword [eax]
push eax
mov esi, ecx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
je 0x4141eb
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsURLA]
test eax, eax
je 0x4141eb
push ebx
push edi
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push str.Mozilla_4.0__Compatible__MSIE_6.0__
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ecx, dword [esi]
mov dword [ebp - 0xaac], eax
lea eax, [ebp - 0x98c]
mov dword [ebp - 0x990], eax
push ecx
or eax, 0xffffffff
lea esi, [ebp - 0x990]
mov byte [ebp - 0x98c], bl
call fcn.004137c0
mov dword [ebp - 0xab4], 4
mov byte [ebp - 0xaa1], 1
mov byte [ebp - 0xaa2], bl
jmp 0x413e02
xor ebx, ebx
lea ecx, [ebp - 0x9d0]
lea edx, [ebp - 0xa58]
mov byte [ebp - 0xa58], bl
lea eax, [ebp - 0xa14]
mov byte [ebp - 0xa14], bl
mov dword [ebp - 0x9d4], ecx
mov byte [ebp - 0x9d0], bl
lea ecx, [ebp - 0xa5c]
lea ebx, [ebp - 0x990]
mov dword [ebp - 0xa5c], edx
mov dword [ebp - 0xa18], eax
call fcn.00414200
mov edx, dword [ebp - 0xa18]
mov esi, dword [ebp - 0xa5c]
push edx
call fcn.004233ae
add esp, 4
push 0
push 0
push 3
push 0
movzx eax, ax
push 0
push eax
mov eax, dword [ebp - 0xaac]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ecx, dword [ebp - 0x9d4]
push 0
push 0x200000
push 0
push 0
push 0
push ecx
push 0x445ef8
push eax
mov dword [ebp - 0xab0], eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
push 0
push 0
push 0
mov ebx, eax
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push 0
lea edx, [ebp - 0xab4]
push edx
lea eax, [ebp - 0xac0]
push eax
push 0x20000013
push ebx
mov dword [ebp - 0xabc], 0x400
call esi
mov eax, dword [ebp - 0xac0]
cmp eax, 0x12e
jne 0x414041
push 0x400
lea ecx, [ebp - 0x508]
push 0
push ecx
call fcn.0042c010
add esp, 0xc
push 0
lea edx, [ebp - 0xabc]
push edx
lea eax, [ebp - 0x508]
push eax
push 0x16
push ebx
call esi
lea edi, [ebp - 0x948]
lea ecx, [ebp - 0x508]
mov dword [ebp - 0x94c], edi
mov byte [ebp - 0x948], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413f31
sub ecx, edx
mov esi, ecx
cmp esi, 0x3f
jl 0x413f61
lea ecx, [esi + 1]
push ecx
push 0
mov dword [ebp - 0x94c], 0
call fcn.00424575
mov edi, eax
add esp, 8
mov dword [ebp - 0x94c], edi
push esi
lea edx, [ebp - 0x508]
push edx
push edi
call fcn.004242c5
mov eax, dword [ebp - 0x94c]
mov byte [esi + eax], 0
mov ecx, dword [ebp - 0x94c]
push str.Location:
push ecx
call fcn.0042449d
mov esi, dword [ebp - 0x94c]
add esp, 0x14
test eax, eax
jne 0x413f9c
or eax, 0xffffffff
jmp 0x413f9e
sub eax, esi
lea edi, [eax + 0xa]
test edi, edi
je 0x413fc2
js 0x413fbd
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413fb0
sub eax, edx
cmp edi, eax
jle 0x413fc2
or eax, 0xffffffff
jmp 0x413fe2
lea eax, [esi + edi]
push 0x446f30
push eax
call fcn.0042449d
add esp, 8
test eax, eax
jne 0x413fdc
or eax, 0xffffffff
jmp 0x413fe2
sub eax, dword [ebp - 0x94c]
sub eax, edi
lea ecx, [ebp - 0xaa0]
lea edx, [ebp - 0x94c]
call fcn.004138e0
mov edx, dword [eax]
push edx
or eax, 0xffffffff
lea esi, [ebp - 0x990]
call fcn.004137c0
mov eax, dword [ebp - 0xaa0]
lea ecx, [ebp - 0xa9c]
cmp eax, ecx
je 0x41401f
push eax
call fcn.00423ad1
add esp, 4
mov eax, dword [ebp - 0x94c]
lea edx, [ebp - 0x948]
cmp eax, edx
je 0x414142
push eax
call fcn.00423ad1
add esp, 4
jmp 0x414142
cmp eax, 0xc8
jne 0x41413b
mov eax, dword [ebp - 0x990]
push 0x2f
push eax
call fcn.0042455e
add esp, 8
test eax, eax
jne 0x414066
or eax, 0xffffffff
jmp 0x41406c
sub eax, dword [ebp - 0x990]
lea edi, [eax + 1]
or eax, 0xffffffff
lea ecx, [ebp - 0xaa0]
lea edx, [ebp - 0x990]
call fcn.004138e0
mov ecx, dword [eax]
mov esi, dword [ebp - 0xab8]
mov edx, dword [esi]
push ecx
push edx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
mov eax, dword [ebp - 0xaa0]
lea ecx, [ebp - 0xa9c]
cmp eax, ecx
je 0x4140b5
push eax
call fcn.00423ad1
add esp, 4
lea edx, [ebp - 0x108]
push edx
or eax, 0xffffffff
call fcn.004137c0
mov eax, dword [esi]
push 0
push 0
push 2
push 0
push 3
push 0xc0000000
mov edi, 0x400
push eax
mov dword [ebp - 0xaa8], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp dword [ebp - 0xaa8], edi
jne 0x41412d
lea eax, [ebp - 0xaa8]
push eax
push edi
lea ecx, [ebp - 0x908]
push ecx
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0xaa8]
push 0
lea edx, [ebp - 0xac4]
push edx
push eax
lea ecx, [ebp - 0x908]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0xaa8], edi
je 0x4140f1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0xaa2], 1
mov byte [ebp - 0xaa1], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov edx, dword [ebp - 0xab0]
push edx
call esi
mov eax, dword [ebp - 0x9d4]
lea ecx, [ebp - 0x9d0]
cmp eax, ecx
je 0x41416d
push eax
call fcn.00423ad1
add esp, 4
mov eax, dword [ebp - 0xa18]
lea edx, [ebp - 0xa14]
cmp eax, edx
je 0x414186
push eax
call fcn.00423ad1
add esp, 4
mov eax, dword [ebp - 0xa5c]
lea ecx, [ebp - 0xa58]
cmp eax, ecx
je 0x41419f
push eax
call fcn.00423ad1
add esp, 4
cmp byte [ebp - 0xaa1], 0
jne 0x413e00
mov edx, dword [ebp - 0xaac]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x990]
lea ecx, [ebp - 0x98c]
pop edi
pop ebx
cmp eax, ecx
je 0x4141d4
push eax
call fcn.00423ad1
add esp, 4
mov al, byte [ebp - 0xaa2]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042304b
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor al, al
pop esi
call fcn.0042304b
mov esp, ebp
pop ebp
ret 4