Function at 0x405440
Capabilities:
Check if file exists
Create http request
Delete file
Download and write a file
Get http content length
Move file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x435106
mov eax, dword fs:[0]
push eax
mov eax, 0xa040
call fcn.00429820
mov eax, dword [0x4451b0]
xor eax, esp
mov dword [esp + 0xa03c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4451b0]
xor eax, esp
push eax
lea eax, [esp + 0xa054]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], 0
push 0
push 0
push 0
push 0
push str.Download_From_HTTP
mov dword [esp + 0xa070], 1
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x405522
push esi
mov ecx, 0x43a630
call fcn.004029c0
mov byte [esp + 0xa05c], 0
mov eax, dword [esp + 0xa064]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4054eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xa05c], 0xffffffff
mov eax, dword [esp + 0xa068]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4057a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4057a1
mov ecx, 8
mov esi, str.Accept:___r_n_r_n
lea edi, [esp + 0x30]
lea eax, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405540
push 0
sub eax, edx
mov edx, dword [esp + 0xa068]
push SysReAllocString
sar eax, 1
push eax
lea ecx, [esp + 0x3c]
push ecx
push edx
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov ebp, eax
xor esi, esi
cmp ebp, esi
jne 0x405583
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [esp + 0x18]
jmp 0x4054b5
push esi
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
push 0x20000005
push ebp
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], 4
mov dword [esp + 0x30], esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
cmp eax, esi
jne 0x4055b2
mov dword [esp + 0x28], esi
mov eax, dword [esp + 0xa068]
add eax, 0xfffffff0
call fcn.00401ea0
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0xa05c], 2
cmp dword [esp + 0xa06c], esi
je 0x405658
lea esi, [esp + 0x24]
call fcn.004057d0
lea edi, [esp + 0x14]
mov byte [esp + 0xa05c], 3
call fcn.00405b30
mov byte [esp + 0xa05c], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40561b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405654
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x405654
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [esp + 0x18]
push esi
mov ecx, 0x43a630
call fcn.004029c0
jmp 0x405780
mov edi, dword [esp + 0x14]
push 0x43aa20
push edi
call fcn.0041b304
mov esi, eax
add esp, 8
test esi, esi
jne 0x4056a8
mov esi, dword [esp + 0x18]
push esi
mov ecx, 0x43a630
call fcn.004029c0
lea eax, [edi - 0x10]
mov byte [esp + 0xa05c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4054c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4054c0
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x1c]
push ecx
push 0xa000
lea edx, [esp + 0x58]
push edx
push ebp
call edi
test eax, eax
je 0x405707
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea ebx, [ebx]
mov eax, dword [esp + 0x1c]
push esi
test eax, eax
je 0x405724
push eax
lea eax, [esp + 0x58]
push 1
push eax
call fcn.0041b47d
add esp, 0x10
push 1
call ebx
lea ecx, [esp + 0x1c]
push ecx
push 0xa000
lea edx, [esp + 0x58]
push edx
push ebp
call edi
test eax, eax
jne 0x4056d0
mov ebx, dword [esp + 0x20]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call esi
push ebx
call esi
mov esi, dword [esp + 0x18]
push esi
mov ecx, 0x43a630
call fcn.004029c0
jmp 0x405780
call fcn.0041b576
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 4
push ebp
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
cmp dword [esp + 0xa06c], 0
je 0x405768
mov ecx, dword [esp + 0xa068]
mov esi, dword [esp + 0x14]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x405640
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0xa068]
add eax, 0xfffffff0
call fcn.00401ea0
mov esi, dword [esp + 0x18]
add eax, 0x10
mov dword [esi], eax
lea eax, [esp + 0x14]
call fcn.0040b990
lea eax, [esp + 0xa064]
call fcn.0040b990
lea eax, [esp + 0xa068]
call fcn.0040b990
mov eax, esi
mov ecx, dword [esp + 0xa054]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa03c]
xor ecx, esp
call fcn.0041a78f
add esp, 0xa04c
ret