Function at 0x401610
Capabilities:
Check http status code
Connect to http server
Create http request
Delete file
Download and write a file
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 0xffffffffffffffff
push 0x424df6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1898
call fcn.0040c3a0
mov eax, dword [0x4310a8]
xor eax, dword [esp + 0x18a8]
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x18b8]
mov dword [esp + 0x18a0], eax
push edi
lea eax, [esi + 0x18]
mov edi, eax
sub edi, ecx
mov dl, byte [ecx]
mov byte [edi + ecx], dl
inc ecx
test dl, dl
jne 0x401657
lea edi, [esp + 0x1a4]
mov dword [esi + 0x51c], 3
mov word [esi + 0x518], 0x50
mov ecx, eax
sub edi, eax
nop
mov dl, byte [ecx]
mov byte [edi + ecx], dl
inc ecx
test dl, dl
jne 0x401680
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401690
sub eax, edx
xor ebx, ebx
xor edx, edx
xor ecx, ecx
cmp eax, ebx
jle 0x4016c0
cmp byte [esp + ecx + 0x1a4], 0x2f
jne 0x4016b6
mov byte [esp + ecx + 0x1a4], 0x20
inc edx
cmp edx, 1
je 0x4016c0
inc ecx
cmp ecx, eax
jl 0x4016a3
push 0x50
lea ebp, [esi + 0x318]
push ebp
lea edi, [esi + 0x218]
push edi
lea eax, [esp + 0x1b0]
push str._s__s__s__d
push eax
call fcn.0040c32b
add esp, 0x14
call fcn.00421220
mov eax, dword [eax + 0x10]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esi + 0x520], eax
jne 0x401715
push ebx
push ebx
push str.NotInternetOpen
call fcn.0042032d
xor eax, eax
jmp 0x401ac1
mov ecx, dword [esi + 0x51c]
push esi
push ebx
push ecx
xor edx, edx
mov dx, word [esi + 0x518]
push ebx
push ebx
push edx
push edi
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, ebx
mov dword [esi + 0x524], eax
jne 0x40175c
push ebx
push ebx
push str.NotInternetConnect
call fcn.0042032d
mov eax, dword [esi + 0x520]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x401ac1
cmp word [esi + 0x518], 0x1bb
mov dword [esp + 0x24], 0x4265e8
mov dword [esp + 0x28], ebx
mov ecx, 0x84400100
jne 0x40177d
mov ecx, 0x84c03100
push esi
push ecx
lea ecx, [esp + 0x2c]
push ecx
push ebx
push str.HTTP_1.1
push ebp
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
push ebx
mov dword [esi + 0x528], eax
push ebx
jne 0x4017c8
push str.NotOpenRequest
call fcn.0042032d
mov edx, dword [esi + 0x524]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call edi
mov eax, dword [esi + 0x520]
push eax
call edi
xor eax, eax
jmp 0x401ac1
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, ebx
jne 0x4017f4
mov ecx, dword [esi + 0x524]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
call edi
mov edx, dword [esi + 0x520]
push edx
call edi
xor eax, eax
jmp 0x401ac1
mov edx, dword [esi + 0x528]
push ebx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x3ac]
push ecx
push 5
push edx
mov dword [esp + 0x28], 0x100000
mov dword [esp + 0x30], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40183f
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x3a8]
push 0x4265c8
push ecx
call fcn.0040c32b
add esp, 0xc
cmp dword [esp + 0x14], ebx
jne 0x401862
mov edx, dword [esi + 0x524]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call edi
mov eax, dword [esi + 0x520]
push eax
call edi
jmp 0x401abc
mov edi, dword [esp + 0x18c0]
lea ecx, [esp + 0x7c]
push ecx
push edi
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
call fcn.0041897c
test eax, eax
je 0x4018b5
lea edx, [esp + 0x7c]
push edx
push edi
mov byte [esp + 0xa4], 0
call fcn.00418b19
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebp, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esp + 0x18], eax
jne 0x401974
call fcn.004188ce
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
push edi
lea eax, [esp + 0x14]
push str.CreateFile__s__Fail_
push eax
mov dword [esp + 0x18c0], ebx
call fcn.004015b0
mov edi, dword [esp + 0x1c]
mov ecx, dword [edi - 4]
mov eax, 1
sub eax, ecx
mov ecx, dword [edi - 8]
add esp, 0xc
or ecx, eax
jge 0x401935
push ebx
lea ecx, [esp + 0x14]
call fcn.004011e0
mov edi, dword [esp + 0x10]
push ebx
push ebx
push edi
call fcn.0042032d
mov ecx, dword [esi + 0x524]
push ecx
call ebp
mov edx, dword [esi + 0x520]
push edx
call ebp
lea eax, [edi - 0x10]
mov dword [esp + 0x18b4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401974
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov edx, dword [esi + 0x528]
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x64]
push ecx
push 0x13
push edx
mov dword [esp + 0x34], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4019c3
lea edx, [esp + 0x5c]
push edx
call fcn.0040c2a3
add esp, 4
cmp eax, 0x197
je 0x4019dc
cmp eax, 0x191
je 0x4019dc
cmp eax, 0xc8
je 0x401a03
cmp eax, 0xce
je 0x401a03
mov eax, dword [esi + 0x524]
push eax
call ebp
mov ecx, dword [esi + 0x520]
push ecx
call ebp
xor eax, eax
jmp 0x401ac1
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [esi + 0x528]
lea edx, [esp + 0x10]
push edx
push 0x400
lea eax, [esp + 0x4ac]
push eax
push ecx
call edi
cmp dword [esp + 0x10], ebx
jne 0x4019e2
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov ecx, 0xa
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.WININET.dll_InternetReadFileExA]
mov eax, 0x400
lea edx, [esp + 0x8a4]
mov dword [esp + 0x2c], 0x28
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 0x3ff
mov ecx, dword [esi + 0x528]
push 0
push 8
lea eax, [esp + 0x34]
push eax
push ecx
call edi
test eax, eax
je 0x4019c3
mov eax, dword [esp + 0x44]
test eax, eax
je 0x401a9f
lea ecx, [esp + 0x54]
call fcn.00418850
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
call ebx
mov dword [esp + 0x18b4], 0xffffffff
call fcn.00418866
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x401a44
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x524]
push eax
call ebp
mov ecx, dword [esi + 0x520]
push ecx
call ebp
mov eax, 1
mov ecx, dword [esp + 0x18ac]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x18a0]
xor ecx, dword [esp + 0x18b4]
pop esi
pop ebp
pop ebx
call fcn.0040c390
add esp, 0x18a8
ret 8