Function at 0x403c4e
Capabilities:
Check http status code
Check if file exists
Create directory
Create http request
Download and write a file
Get http content length
Print debug messages
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43975c
mov eax, dword fs:[0]
push eax
mov eax, 0x4028
call fcn.0040c150
push ebx
push esi
push edi
mov eax, dword [0x4481f4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 0xc]
xor ebx, ebx
cmp ecx, ebx
mov dword [ebp - 4], 1
jne 0x403caa
lea ecx, [eax - 0x10]
call fcn.00401050
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00401050
xor eax, eax
jmp 0x403f6d
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00401438
pop ecx
pop ecx
push 0x44988c
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.0040147e
lea eax, [ebp - 0x28]
push ebx
push eax
mov byte [ebp - 4], 3
call fcn.00401221
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00401069
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.00401050
push 0x43f538
mov edi, 0x104
push edi
lea ecx, [ebp - 0x14]
call fcn.00401375
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push eax
call esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.0040150a
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x403d48
push ebx
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x14]
call fcn.004016db
pop ecx
push 0x80
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
call fcn.004010b9
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
push edi
mov byte [ebp - 4], 5
call fcn.00401375
push eax
call esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0040150a
push ebx
push ebx
push ebx
push ebx
push 0x43f514
mov byte [ebp - 0xd], bl
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x403ea9
push ebx
push SysReAllocString
push ebx
push ebx
push dword [ebp + 8]
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, ebx
mov dword [ebp - 0x2c], eax
je 0x403e8f
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebx
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x28]
push ecx
push 0x20000005
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], 4
call esi
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jne 0x403de1
push 0x43f478
call edi
mov byte [ebp - 0xd], 1
push ebx
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
push 0x20000013
push dword [ebp - 0x2c]
mov dword [ebp - 0x30], ebx
call esi
test eax, eax
jne 0x403dff
mov byte [ebp - 0xd], 1
cmp dword [ebp - 0x30], 0xc8
je 0x403e0c
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], bl
jne 0x403e84
cmp dword [ebp - 0x28], ebx
je 0x403e84
push 0x43f46c
push dword [ebp - 0x18]
call fcn.0040c0e6
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
jne 0x403e38
push 0x43f3d8
call edi
mov byte [ebp - 0xd], 1
jmp 0x403e84
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x20]
push eax
push 0x4000
lea eax, [ebp - 0x4034]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
je 0x403e79
cmp dword [ebp - 0x20], ebx
je 0x403e7d
push esi
push dword [ebp - 0x20]
lea eax, [ebp - 0x4034]
push 1
push eax
call fcn.0040bf9e
add esp, 0x10
cmp dword [ebp - 0x20], ebx
jne 0x403e3b
jmp 0x403e7d
mov byte [ebp - 0xd], 1
push esi
call fcn.0040bdc3
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x403e9e
push 0x43f338
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 0xd], 1
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x403eb8
push 0x43f2a0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], bl
mov edi, dword [ebp + 0xc]
jne 0x403f31
lea eax, [ebp - 0x24]
push eax
mov esi, 0x43f288
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004015dc
push dword [eax]
mov byte [ebp - 4], 6
push dword [ebp - 0x18]
call fcn.004016ae
mov ecx, dword [ebp - 0x1c]
add esp, 0x14
add ecx, 0xfffffff0
mov byte [ebp - 4], 5
call fcn.00401050
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004015dc
push dword [eax]
mov byte [ebp - 4], 7
push dword [ebp - 0x18]
call fcn.004010fa
mov ecx, dword [ebp - 0x1c]
add esp, 0x14
add ecx, 0xfffffff0
mov byte [ebp - 4], 5
call fcn.00401050
push 1
push 1
push edi
push dword [ebp - 0x18]
call fcn.004012bc
add esp, 0x10
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00401050
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00401050
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.00401050
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401050
lea ecx, [edi - 0x10]
call fcn.00401050
xor eax, eax
cmp byte [ebp - 0xd], bl
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8