Function at 0x402110
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.00447430
push 0xffffffffffffffff
push 0x45bea0
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x473ff0]
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 0x402186
push 0x46f87c
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x48], 0x469470
call fcn.0044562b
mov esi, edi
call fcn.00402d00
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 0x4021bf
push 0x46f87c
lea edx, [ebp - 0x34]
push edx
mov dword [ebp - 0x34], 0x46924c
call fcn.0044562b
push ebx
push edi
call fcn.00401e80
mov esi, 8
cmp dword [edi + 0x38], esi
jb 0x4021d5
mov eax, dword [edi + 0x24]
jmp 0x4021d8
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 0x402211
push 0x46f87c
lea ecx, [ebp - 0x3c]
push ecx
mov dword [ebp - 0x3c], 0x469264
call fcn.0044562b
cmp dword [edi + 0x70], esi
jb 0x40221b
mov ecx, dword [edi + 0x5c]
jmp 0x40221e
lea ecx, [edi + 0x5c]
push 0
push SysReAllocString
push 0
push 0
push str.HTTP_1.1
push ecx
push 0x4692dc
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [edi + 0x98], eax
test eax, eax
jne 0x40225a
push 0x46f87c
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x469290
call fcn.0044562b
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.00402090
mov eax, dword [ebp + 0x3c]
cmp dword [ebp + 0x50], esi
jae 0x402286
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 0x4022b5
push 0x46f87c
lea eax, [ebp - 0x4c]
push eax
mov dword [ebp - 0x4c], 0x4692a8
call fcn.0044562b
mov ebx, 0x1000
push ebx
lea ecx, [ebp + 0x55]
push 0
push ecx
mov byte [ebp + 0x54], 0
call fcn.00445b20
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 0x402304
push 0x46f87c
lea edx, [ebp - 0x38]
push edx
mov dword [ebp - 0x38], 0x4692c0
call fcn.0044562b
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp]
call fcn.004031a0
lea ecx, [ebp]
push ecx
mov edx, 0x4692d8
mov byte [ebp - 4], 2
call fcn.004024f0
cmp eax, 0xffffffff
je 0x40233c
push 0x46f87c
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x28], 0x469480
call fcn.0044562b
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 0x40236d
push 0x46f87c
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], 0x4692c0
call fcn.0044562b
mov ecx, dword [ebp - 0x18]
lea edx, [ebp + 0x54]
push edx
mov byte [ebp + ecx + 0x54], 0
call fcn.00443efd
add esp, 4
mov dword [ebp - 0x20], eax
xor ebx, ebx
mov esi, dword [ebp - 0x30]
push ebx
push esi
mov edx, 0x469494
call fcn.00402570
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4023e4
push esi
mov ecx, ebx
xor edx, edx
lea esi, [ebp + 0x1c]
call fcn.004025a0
mov eax, dword [ebp + 0x20]
mov esi, 8
cmp dword [ebp + 0x34], esi
jae 0x4023b9
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4023d9
mov eax, dword [ebp + 0x20]
cmp dword [ebp + 0x34], esi
jae 0x4023d0
lea eax, [ebp + 0x20]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea esi, [ebp + 0x1c]
inc ebx
call fcn.00401730
jmp 0x402386
cmp dword [esi + 0x18], 8
jb 0x4023ef
mov esi, dword [esi + 4]
jmp 0x4023f2
add esi, 4
push 0x469224
push esi
call fcn.0044399e
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40241b
push 0x46f87c
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], 0x469498
call fcn.0044562b
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 0x40247a
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40247a
push ebx
push 1
push eax
lea ecx, [ebp + 0x54]
push ecx
mov byte [ebp + eax + 0x54], 0
call fcn.00443b17
mov eax, dword [edi + 0x9c]
add esi, dword [ebp - 0x18]
add esp, 0x10
test eax, eax
je 0x402420
mov edx, dword [edi + 0xa0]
push 0
push esi
push edx
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x402420
push ebx
call fcn.00443c10
add esp, 4
cmp dword [ebp - 0x20], esi
je 0x40249d
push 0x46f87c
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], 0x4694bc
call fcn.0044562b
lea ecx, [ebp]
mov bl, 1
call fcn.00402d50
lea esi, [ebp + 0x38]
call fcn.00401730
jmp 0x4024c2
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.004437f0
add ebp, 0x105c
mov esp, ebp
pop ebp
ret 4