Function at 0x402550
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 - 0x105c]
mov eax, 0x105c
call fcn.004493b0
push 0xffffffffffffffff
push 0x45e540
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4770c4]
xor eax, ebp
mov dword [ebp + 0x1058], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1064]
mov ebx, edx
mov edi, ecx
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], 0
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x11], 0
jne 0x4025c6
push 0x4724a4
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x48], 0x46c468
call fcn.0044975c
mov esi, edi
call fcn.00402ea0
push 0
push 0
push 0
push 0
push str.Http_connect
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [edi + 0x90], eax
test eax, eax
jne 0x4025ff
push 0x4724a4
lea edx, [ebp - 0x34]
push edx
mov dword [ebp - 0x34], 0x46c248
call fcn.0044975c
push ebx
push edi
call fcn.004022c0
mov esi, 8
cmp dword [edi + 0x38], esi
jb 0x402615
mov eax, dword [edi + 0x24]
jmp 0x402618
lea eax, [edi + 0x24]
push 0
push 0
push 3
push 0
push 0
push 0x50
push eax
mov eax, dword [edi + 0x90]
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [edi + 0x94], eax
test eax, eax
jne 0x402651
push 0x4724a4
lea ecx, [ebp - 0x3c]
push ecx
mov dword [ebp - 0x3c], 0x46c260
call fcn.0044975c
cmp dword [edi + 0x70], esi
jb 0x40265b
mov ecx, dword [edi + 0x5c]
jmp 0x40265e
lea ecx, [edi + 0x5c]
push 0
push SysReAllocString
push 0
push 0
push str.HTTP_1.1
push ecx
push 0x46c2d8
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [edi + 0x98], eax
test eax, eax
jne 0x40269a
push 0x4724a4
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x46c28c
call fcn.0044975c
xor eax, eax
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], 0
mov word [ebp + 0x3c], ax
push edi
lea eax, [ebp + 0x38]
mov byte [ebp - 4], 1
call fcn.004024d0
mov eax, dword [ebp + 0x3c]
cmp dword [ebp + 0x50], esi
jae 0x4026c6
lea eax, [ebp + 0x3c]
mov ecx, dword [ebp + 0x4c]
mov edx, dword [edi + 0x98]
push 0
push 0
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4026f5
push 0x4724a4
lea eax, [ebp - 0x4c]
push eax
mov dword [ebp - 0x4c], 0x46c2a4
call fcn.0044975c
mov ebx, 0x1000
push ebx
lea ecx, [ebp + 0x55]
push 0
push ecx
mov byte [ebp + 0x54], 0
call fcn.00447cc0
mov ecx, dword [edi + 0x98]
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
add esp, 0xc
push 0
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp + 0x54]
push eax
push 0x15
push ecx
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x402744
push 0x4724a4
lea edx, [ebp - 0x38]
push edx
mov dword [ebp - 0x38], 0x46c2bc
call fcn.0044975c
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp]
call fcn.00403400
lea ecx, [ebp]
push ecx
mov edx, 0x46c2d4
mov byte [ebp - 4], 2
call fcn.00402930
cmp eax, 0xffffffff
je 0x40277c
push 0x4724a4
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x28], 0x46c478
call fcn.0044975c
mov edx, dword [edi + 0x98]
push 0
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 0x54]
push ecx
push 5
push edx
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x4027ad
push 0x4724a4
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], 0x46c2bc
call fcn.0044975c
mov ecx, dword [ebp - 0x18]
lea edx, [ebp + 0x54]
push edx
mov byte [ebp + ecx + 0x54], 0
call fcn.004466c5
add esp, 4
mov dword [ebp - 0x20], eax
xor ebx, ebx
mov esi, dword [ebp - 0x30]
push ebx
push esi
mov edx, 0x46c48c
call fcn.004029b0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402824
push esi
mov ecx, ebx
xor edx, edx
lea esi, [ebp + 0x1c]
call fcn.004029e0
mov eax, dword [ebp + 0x20]
mov esi, 8
cmp dword [ebp + 0x34], esi
jae 0x4027f9
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402819
mov eax, dword [ebp + 0x20]
cmp dword [ebp + 0x34], esi
jae 0x402810
lea eax, [ebp + 0x20]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea esi, [ebp + 0x1c]
inc ebx
call fcn.00401b70
jmp 0x4027c6
cmp dword [esi + 0x18], 8
jb 0x40282f
mov esi, dword [esi + 4]
jmp 0x402832
add esi, 4
push 0x46c1d4
push esi
call fcn.004460ce
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40285b
push 0x4724a4
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], 0x46c490
call fcn.0044975c
xor esi, esi
lea ecx, [ecx]
mov eax, dword [edi + 0x98]
lea ecx, [ebp - 0x18]
push ecx
push 0x1000
lea edx, [ebp + 0x54]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4028ba
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4028ba
push ebx
push 1
push eax
lea ecx, [ebp + 0x54]
push ecx
mov byte [ebp + eax + 0x54], 0
call fcn.00446247
mov eax, dword [edi + 0x9c]
add esi, dword [ebp - 0x18]
add esp, 0x10
test eax, eax
je 0x402860
mov edx, dword [edi + 0xa0]
push 0
push esi
push edx
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x402860
push ebx
call fcn.00446340
add esp, 4
cmp dword [ebp - 0x20], esi
je 0x4028dd
push 0x4724a4
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], 0x46c4b4
call fcn.0044975c
lea ecx, [ebp]
mov bl, 1
call fcn.00402ef0
lea esi, [ebp + 0x38]
call fcn.00401b70
jmp 0x402902
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1058]
xor ecx, ebp
call fcn.00445f20
add ebp, 0x105c
mov esp, ebp
pop ebp
ret 4