Function at 0x405eb0
Capabilities:
Check if file exists
Connect to http server
Create directory
Create http request
Download and write a file
Get file attributes
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
lea ebp, [esp - 0x478]
sub esp, 0x478
push 0xffffffffffffffff
push 0x417730
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x41d2b0]
xor eax, ebp
mov dword [ebp + 0x474], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 0x480]
mov eax, dword [ebp + 0x484]
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x406313
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405f20
sub eax, edx
sar eax, 1
je 0x406313
mov ecx, esi
call fcn.004053a0
push ebx
push ebx
push ebx
push ebx
push str.Http_connect
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 0xd0], eax
cmp eax, ebx
jne 0x405f6a
push 0x41add8
lea ecx, [ebp - 0x4c]
push ecx
mov dword [ebp - 0x4c], 0x41840c
call fcn.00408a0b
push edi
lea ecx, [ebp + 0x54]
mov dword [ebp - 0x1c], 0x50
call fcn.00402140
lea edx, [ebp - 0x1c]
push edx
lea ebx, [esi + 0x130]
push ebx
lea edi, [esi + 0xf8]
lea eax, [ebp + 0x54]
push edi
push eax
mov byte [ebp - 4], 1
call fcn.00405560
add esp, 0x10
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 0
call fcn.00401f80
cmp dword [edi + 0x18], 8
jb 0x405fb3
mov edi, dword [edi + 4]
jmp 0x405fb6
add edi, 4
mov ecx, dword [esi + 0xd0]
push 0
push 0
push 3
push 0
push 0
push 0x50
push edi
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 0xd4], eax
test eax, eax
jne 0x405fef
push 0x41add8
lea edx, [ebp - 0x54]
push edx
mov dword [ebp - 0x54], 0x4183f4
call fcn.00408a0b
mov edi, 8
cmp dword [ebx + 0x18], edi
jb 0x405ffe
mov ecx, dword [ebx + 4]
jmp 0x406001
lea ecx, [ebx + 4]
push 0
push 0x80000000
push 0
push 0
push 0x4183e0
push ecx
push 0x4183d8
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esi + 0xd8], eax
test eax, eax
jne 0x40603d
push 0x41add8
lea eax, [ebp - 0x5c]
push eax
mov dword [ebp - 0x5c], 0x4183c0
call fcn.00408a0b
xor ecx, ecx
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], 0
mov word [ebp + 0x3c], cx
lea edx, [ebp + 0x38]
push edx
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.00405e40
mov eax, dword [ebp + 0x3c]
cmp dword [ebp + 0x50], edi
jae 0x40606b
lea eax, [ebp + 0x3c]
mov ecx, dword [ebp + 0x4c]
mov edx, dword [esi + 0xd8]
push 0
push 0
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x40609a
push 0x41add8
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x50], 0x4182d4
call fcn.00408a0b
mov ebx, 0x400
push ebx
lea ecx, [ebp + 0x71]
push 0
push ecx
mov byte [ebp + 0x70], 0
call fcn.004090b0
mov ecx, dword [esi + 0xd8]
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
add esp, 0xc
push 0
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp + 0x70]
push eax
push 0x15
push ecx
mov dword [ebp - 0x18], ebx
call edi
test eax, eax
jne 0x4060e9
push 0x41add8
lea edx, [ebp - 0x48]
push edx
mov dword [ebp - 0x48], 0x4182bc
call fcn.00408a0b
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp]
call fcn.00402b60
push 0
push 0x4182b8
lea ecx, [ebp]
mov byte [ebp - 4], 3
call fcn.00405340
cmp eax, 0xffffffff
je 0x406122
push 0x41add8
lea ecx, [ebp - 0x30]
push ecx
mov dword [ebp - 0x30], 0x4182a4
call fcn.00408a0b
mov ecx, dword [esi + 0xd8]
push 0
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp + 0x70]
push eax
push 5
push ecx
mov dword [ebp - 0x18], ebx
call edi
test eax, eax
jne 0x406153
push 0x41add8
lea edx, [ebp - 0x58]
push edx
mov dword [ebp - 0x58], 0x4182bc
call fcn.00408a0b
mov eax, dword [ebp - 0x18]
lea ecx, [ebp + 0x70]
push ecx
mov byte [ebp + eax + 0x70], 0
call fcn.00408f65
fst qword [ebp - 0x64]
fld qword [0x418270]
add esp, 4
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x406183
call fcn.00409000
mov dword [ebp - 0x1c], eax
jmp 0x40618c
fstp st(0)
mov dword [ebp - 0x1c], 0x800000
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004077f9
mov ebx, eax
mov eax, dword [ebp - 0x24]
add esp, 4
push eax
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x28], ebx
xor edi, edi
call fcn.00402140
mov byte [ebp - 4], 4
nop
push edi
push 0x41a430
lea ecx, [ebp + 0x1c]
call fcn.00405370
mov edi, eax
cmp edi, 0xffffffff
je 0x40620c
push edi
push 0
lea ecx, [ebp + 0x54]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.004023a0
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x4061e0
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406201
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x4061f8
lea eax, [ebp + 0x58]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [ebp + 0x54]
inc edi
call fcn.00401f80
jmp 0x4061b0
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x20], 0
jae 0x40621f
lea eax, [ebp + 0x20]
push 0x41829c
push eax
lea edx, [ebp - 0x20]
push edx
call fcn.004073a7
add esp, 0xc
cmp dword [ebp - 0x20], 0
jne 0x40624c
push 0x41add8
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x418278
call fcn.00408a0b
fldz
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
fstp qword [ebp - 0x38]
jmp 0x406262
fstp st(0)
mov edx, dword [ebp - 0x1c]
mov eax, dword [esi + 0xd8]
lea ecx, [ebp - 0x18]
push ecx
push edx
push ebx
push eax
call edi
test eax, eax
je 0x4062c7
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4062c7
mov ecx, dword [ebp - 0x20]
push ecx
push 1
push eax
push ebx
call fcn.004080fe
fild dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
add esp, 0x10
test edx, edx
jge 0x40629f
fadd qword [0x418268]
fadd qword [ebp - 0x38]
mov ecx, dword [esi + 0xcc]
fst qword [ebp - 0x38]
test ecx, ecx
je 0x406260
mov eax, dword [ecx]
mov edx, dword [eax]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [ebp - 0x64]
fstp qword [esp]
push 0
push esi
call edx
jmp 0x406262
mov eax, dword [ebp - 0x20]
push eax
call fcn.0040772e
fld qword [ebp - 0x38]
fcomp qword [ebp - 0x64]
add esp, 4
fnstsw ax
test ah, 0x44
jnp 0x4062f5
push 0x41add8
lea ecx, [ebp - 0x40]
push ecx
mov dword [ebp - 0x40], 0x418244
call fcn.00408a0b
lea ecx, [ebp + 0x1c]
mov byte [ebp - 0x11], 1
call fcn.00401f80
lea ecx, [ebp]
call fcn.004026c0
lea ecx, [ebp + 0x38]
call fcn.00401f80
jmp 0x406340
push 0x41add8
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x4184dc
call fcn.00408a0b
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x2c]
push eax
add ecx, 4
call fcn.00405400
mov eax, 0x40633d
ret
test ebx, ebx
je 0x40634d
push ebx
call fcn.004078c3
add esp, 4
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x474]
xor ecx, ebp
call fcn.00406e5e
add ebp, 0x478
mov esp, ebp
pop ebp
ret 8