Function at 0x4070a7
Capabilities:
Check http status code
Connect to http server
Get file attributes
Move file
Read and send data from client to server
Read data from internet
Read file on windows
Receive data
Send data
Send http request
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42741e
mov eax, dword fs:[0]
push eax
mov eax, 0x97d4
call fcn.0041ca90
mov eax, dword [0x433558]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x97a8], esi
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x97b8], eax
xor eax, eax
mov dword [ebp - 0x97bc], ecx
push ecx
lea ecx, [ebp - 0x97a0]
mov dword [ebp - 0x97b0], ebx
mov dword [ebp - 0x97ac], edi
mov dword [ebp - 0x97d0], eax
mov byte [ebp - 0x97a1], al
call fcn.0040693d
cmp dword [ebp - 0x7a5c], 0
jne 0x407141
test ebx, ebx
je 0x407139
push str.Protocol_not_supported
push 5
push edi
call ebx
add esp, 0xc
xor eax, eax
inc eax
jmp 0x407c63
xor eax, eax
push eax
push eax
push dword [ebp - 0x7a5c]
lea eax, [ebp - 0x96e0]
push eax
lea eax, [ebp - 0x9760]
push eax
push dword [ebp - 0x9260]
lea eax, [ebp - 0x9660]
push eax
push dword [esi + 4]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x97b4], eax
xor ecx, ecx
mov dword [ebp - 4], ecx
test eax, eax
jne 0x407197
test ebx, ebx
je 0x40718f
push str.InternetConnect___failed
push 5
push edi
call ebx
add esp, 0xc
or edi, 0xffffffff
jmp 0x407c61
xor ebx, ebx
mov edx, ebx
movzx ecx, word [ebp + edx - 0x925c]
lea edx, [edx + 2]
mov word [ebp + edx - 0x7a1a], cx
test cx, cx
jne 0x40719b
lea edx, [ebp - 0x8a5c]
mov esi, edx
mov cx, word [edx]
add edx, 2
cmp cx, bx
jne 0x4071bb
lea edi, [ebp - 0x7a18]
sub edx, esi
sub edi, 2
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4071d1
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
cmp dword [ebp - 0x7a5c], 3
rep movsb byte es:[edi], byte [esi]
jne 0x407c81
push ebx
push 0x400000
lea ecx, [ebp - 0x97dc]
mov dword [ebp - 0x97dc], 0x42ee94
push ecx
push ebx
push ebx
lea ecx, [ebp - 0x7a18]
mov dword [ebp - 0x97d8], ebx
push ecx
push str.HEAD
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
mov dword [ebp - 0x97d4], ebx
xor eax, eax
mov byte [ebp - 4], 1
push eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x407259
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x407259
push 0x11
pop edi
jmp 0x4077eb
mov edi, dword [ebp - 0x97a8]
mov ecx, edi
push ebx
call fcn.00406f3b
mov ecx, edi
call fcn.00406ed5
push 0x13
xor eax, eax
push ebx
mov dword [ebp - 0x97c4], eax
call fcn.00406df8
cmp eax, 0xc8
je 0x40733d
mov esi, dword [ebp - 0x97b4]
add eax, 0xfffffed3
cmp eax, 1
ja 0x407335
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov esi, eax
mov dword [ebp - 0x97b4], esi
test ebx, ebx
je 0x4072c3
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x97d4], ebx
push str.Location:
mov ecx, edi
call fcn.00406e69
lea edx, [ebp - 0x6a18]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x4072d7
mov eax, dword [ebp - 0x97b0]
cmp word [ebp - 0x6a18], si
jne 0x407313
test eax, eax
je 0x40730b
push str.Redirected_to_unknown_location
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
or edi, 0xffffffff
jmp 0x407c02
push dword [ebp - 0x97ac]
mov ecx, edi
push eax
push dword [ebp - 0x97b8]
lea eax, [ebp - 0x6a18]
push eax
call fcn.004070a7
mov edi, eax
jmp 0x407c02
push 0xfffffffffffffffe
pop edi
jmp 0x407c02
push 5
push ebx
call fcn.00406df8
mov dword [ebp - 0x97c4], eax
test ebx, ebx
je 0x407362
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x97d4], ebx
jmp 0x407364
xor eax, eax
push str.Content_Type:
mov ecx, edi
mov byte [ebp - 0x97a2], al
call fcn.00406e69
lea edx, [ebp - 0x218]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x40737e
lea eax, [ebp - 0x218]
push str.text_html
push eax
call fcn.0040e377
pop ecx
pop ecx
test eax, eax
jne 0x4073bb
lea eax, [ebp - 0x218]
push str.text_plain
push eax
call fcn.0040e377
pop ecx
pop ecx
test eax, eax
je 0x4073f3
mov esi, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97ac]
mov byte [ebp - 0x97a2], 1
test esi, esi
je 0x4073ff
push dword [ebp - 0x97bc]
push 6
push edi
call esi
add esp, 0xc
neg al
sbb al, al
inc al
mov byte [ebp - 0x97a1], al
je 0x4073ff
jmp 0x4074e0
mov esi, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97ac]
xor eax, eax
push 0x400
push eax
lea eax, [ebp - 0x1618]
push eax
call fcn.00412ee0
add esp, 0xc
push 0x2f
pop eax
push eax
lea eax, [ebp - 0x925c]
push eax
call fcn.0040d6ad
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x407470
push 0x2f
pop esi
add ecx, 2
lea eax, [ebp - 0x1618]
sub eax, ecx
mov edx, ecx
mov dword [ebp - 0x97bc], eax
mov edi, eax
movzx eax, word [edx]
mov word [edi + edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x407446
push esi
push ecx
call fcn.0040d6ad
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x407431
mov esi, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97ac]
lea eax, [ebp - 0x1618]
push 0x3f
push eax
call fcn.0040d6ad
pop ecx
pop ecx
test eax, eax
je 0x407489
xor ecx, ecx
mov word [eax], cx
test esi, esi
je 0x4074aa
lea eax, [ebp - 0x1618]
push eax
push 7
push edi
call esi
add esp, 0xc
neg al
sbb al, al
inc al
mov byte [ebp - 0x97a1], al
jmp 0x4074b0
mov al, byte [ebp - 0x97a1]
test al, al
jne 0x4074d5
test esi, esi
je 0x4074e8
lea eax, [ebp - 0x97c4]
push eax
push 1
push edi
call esi
add esp, 0xc
neg al
sbb al, al
inc al
mov byte [ebp - 0x97a1], al
je 0x4074e8
xor eax, eax
push eax
push 3
push edi
call esi
add esp, 0xc
or edi, 0xffffffff
jmp 0x4077eb
mov edx, dword [ebp - 0x97b8]
test edx, edx
je 0x407514
xor eax, eax
cmp word [edx], ax
je 0x407514
lea ecx, [ebp - 0xa18]
sub ecx, edx
movzx eax, word [edx]
mov word [ecx + edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x407501
xor edx, edx
jmp 0x40752f
xor edx, edx
mov ecx, edx
movzx eax, word [ecx + 0x42ef2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0xa1a], ax
test ax, ax
jne 0x407518
cmp word [ebp - 0xa18], 0
mov ecx, edx
push 0x5c
pop esi
je 0x40755e
push 0x2f
lea eax, [ebp - 0xa18]
pop edi
cmp word [eax], di
jne 0x40754f
mov word [eax], si
inc ecx
lea eax, [ebp - 0xa18]
lea eax, [eax + ecx*2]
cmp word [eax], dx
jne 0x407547
cmp word [ebp + ecx*2 - 0xa1a], si
jne 0x4075a4
lea edx, [ebp - 0x1618]
xor ecx, ecx
mov esi, edx
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x407572
lea edi, [ebp - 0xa18]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x407588
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
movzx eax, word [ebp + ecx - 0xa18]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x121a], ax
test ax, ax
jne 0x4075a6
lea edi, [ebp - 0x1218]
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, dx
jne 0x4075c7
mov esi, str..dul_
push str.Last_Modified:
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x97a8]
mov ecx, esi
call fcn.00406e69
lea edx, [ebp - 0x1a18]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x4075f5
lea ecx, [ebp - 0x1a18]
call fcn.0040670e
lea ecx, [ebp - 0xa18]
mov dword [ebp - 0x97cc], eax
mov dword [ebp - 0x97bc], edx
call fcn.004068f1
mov edi, eax
mov dword [ebp - 0x97b8], edx
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x7a58]
push eax
call fcn.00412ee0
mov eax, dword [ebp - 0x97b8]
mov ecx, edi
add esp, 0xc
or ecx, eax
je 0x407760
cmp edi, dword [ebp - 0x97cc]
jne 0x407760
cmp eax, dword [ebp - 0x97bc]
jne 0x407760
lea eax, [ebp - 0x7a58]
push eax
lea eax, [ebp - 0xa18]
push eax
call fcn.0040defd
pop ecx
pop ecx
test eax, eax
jne 0x407760
mov eax, dword [ebp - 0x7a44]
cmp eax, dword [ebp - 0x97c4]
jne 0x407760
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x4076b5
push str.File_exists__aborting
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
cmp byte [ebp - 0x97a2], 0
je 0x407757
xor eax, eax
push eax
lea eax, [ebp - 0xa18]
push 0x8002
push eax
call fcn.0040db33
add esp, 0xc
mov dword [ebp - 0x97cc], eax
push eax
call fcn.0040d75b
mov edi, eax
pop ecx
lea esi, [edi + 1]
push esi
call fcn.0040c028
pop ecx
push esi
xor ecx, ecx
mov dword [ebp - 0x97bc], eax
push ecx
push eax
call fcn.00412ee0
mov esi, dword [ebp - 0x97cc]
add esp, 0xc
push edi
mov edi, dword [ebp - 0x97bc]
push edi
push esi
call fcn.0040e8c8
add esp, 0xc
push esi
call fcn.0040ff7b
mov eax, dword [ebp - 0x97b0]
pop ecx
test eax, eax
je 0x407750
push edi
push 8
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
neg al
sbb al, al
inc al
je 0x407750
lea eax, [ebp - 0xa18]
push eax
call fcn.0040f19b
pop ecx
push edi
call fcn.0040d5a5
pop ecx
xor eax, eax
mov edi, eax
jmp 0x4077eb
xor eax, eax
lea ecx, [ebp - 0x1218]
mov dword [ebp - 0x97c0], eax
call fcn.004068f1
or eax, edx
je 0x4077b3
lea eax, [ebp - 0x7a58]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.0040defd
pop ecx
pop ecx
test eax, eax
jne 0x4077b3
push eax
lea eax, [ebp - 0x1218]
push 0x8002
push eax
call fcn.0040db33
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x7a44]
mov dword [ebp - 0x97c0], eax
jmp 0x4077da
lea eax, [ebp - 0x1218]
push eax
call fcn.0040f19b
mov dword [esp], 0x180
lea eax, [ebp - 0x1218]
push 0x8302
push eax
call fcn.0040db33
mov dword [esi + 0xc], eax
or edi, 0xffffffff
add esp, 0xc
mov dword [ebp - 0x97e0], edi
cmp dword [esi + 0xc], edi
jne 0x4077f6
mov esi, dword [ebp - 0x97b4]
jmp 0x407c02
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or eax, 2
push eax
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp - 0x97c0]
mov esi, dword [ebp - 0x97b4]
cmp ecx, dword [ebp - 0x97c4]
jge 0x407a78
xor ecx, ecx
lea eax, [ebp - 0x97dc]
push ecx
push 0x400000
push eax
push ecx
push ecx
lea eax, [ebp - 0x7a18]
push eax
push 0x42ef8c
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
push dword [ebp - 0x97c0]
mov ebx, eax
lea eax, [ebp - 0x118]
push str.Range:_bytes_d__r_n
push eax
mov dword [ebp - 0x97d4], ebx
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [ebp - 0x118]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x97d0]
jne 0x40787c
xor eax, eax
sub ecx, edx
push eax
push eax
sar ecx, 1
lea eax, [ebp - 0x118]
push ecx
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4078b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4078f6
mov ecx, dword [ebp - 0x97a8]
push ebx
call fcn.00406f3b
mov ecx, dword [ebp - 0x97a8]
call fcn.00406ed5
push 0x13
push ebx
call fcn.00406df8
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 2
je 0x407913
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x4078f6
push str.Sould_be__2xx_
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
mov eax, dword [ebp - 0x97a8]
push dword [eax + 0xc]
call fcn.0040ff7b
mov eax, dword [ebp - 0x97a8]
pop ecx
mov dword [eax + 0xc], edi
jmp 0x407c02
mov ecx, dword [ebp - 0x97a8]
push str.Content_Range:_bytes
call fcn.00406e69
lea edx, [ebp - 0x118]
sub edx, eax
movzx ecx, word [eax]
mov word [eax + edx], cx
lea eax, [eax + 2]
test cx, cx
jne 0x40792b
lea eax, [ebp - 0x118]
push eax
call fcn.0040db60
pop ecx
xor esi, esi
mov dword [ebp - 0x97c0], eax
push esi
push eax
mov eax, dword [ebp - 0x97a8]
push dword [eax + 0xc]
call fcn.0040f38c
add esp, 0xc
push 0x2800
call fcn.0040c028
mov dword [ebp - 0x97c8], esi
mov esi, dword [ebp - 0x97b0]
pop ecx
mov dword [ebp - 0x97b8], eax
jmp 0x407987
mov eax, dword [ebp - 0x97b8]
lea ecx, [ebp - 0x97c8]
push ecx
push 0x2800
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4079a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x97c8], 0
je 0x407a0b
push dword [ebp - 0x97c8]
mov eax, dword [ebp - 0x97a8]
push dword [ebp - 0x97b8]
push dword [eax + 0xc]
call fcn.0040f522
mov eax, dword [ebp - 0x97c8]
add esp, 0xc
add dword [ebp - 0x97c0], eax
test esi, esi
je 0x4079fd
lea eax, [ebp - 0x97c0]
push eax
push 4
push dword [ebp - 0x97ac]
call esi
add esp, 0xc
neg al
sbb al, al
inc al
mov byte [ebp - 0x97a1], al
jmp 0x407a03
mov al, byte [ebp - 0x97a1]
test al, al
je 0x407981
push dword [ebp - 0x97b8]
call fcn.0040d5a5
mov esi, dword [ebp - 0x97b4]
pop ecx
mov ecx, dword [ebp - 0x97c0]
cmp ecx, dword [ebp - 0x97c4]
je 0x407a78
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x407a4d
push str.Error_during_downloading__network_error
push 5
push dword [ebp - 0x97ac]
call eax
mov ecx, dword [ebp - 0x97c0]
add esp, 0xc
mov eax, dword [ebp - 0x97a8]
push ecx
push dword [eax + 0xc]
call fcn.0040e60a
mov eax, dword [ebp - 0x97a8]
push dword [eax + 0xc]
call fcn.0040ff7b
mov eax, dword [ebp - 0x97a8]
mov dword [eax + 0xc], edi
jmp 0x407bff
mov eax, dword [ebp - 0x97a8]
push ecx
push dword [eax + 0xc]
call fcn.0040e60a
mov eax, dword [ebp - 0x97a8]
push dword [eax + 0xc]
call fcn.0040ff7b
mov eax, dword [ebp - 0x97bc]
add esp, 0xc
mov ecx, dword [ebp - 0x97cc]
mov dword [ebp - 0x7a24], eax
mov dword [ebp - 0x7a1c], eax
lea eax, [ebp - 0x7a28]
push eax
lea eax, [ebp - 0x1218]
mov dword [ebp - 0x7a28], ecx
push eax
mov dword [ebp - 0x7a20], ecx
call fcn.0040f1a4
cmp byte [ebp - 0x97a2], 0
mov eax, dword [ebp - 0x97a8]
pop ecx
pop ecx
mov dword [eax + 0xc], edi
je 0x407ba0
xor eax, eax
push eax
lea eax, [ebp - 0x1218]
push 0x8002
push eax
call fcn.0040db33
add esp, 0xc
mov dword [ebp - 0x97bc], eax
push eax
call fcn.0040d75b
pop ecx
mov dword [ebp - 0x97d0], eax
lea edi, [eax + 1]
push edi
call fcn.0040c028
pop ecx
push edi
xor ecx, ecx
mov dword [ebp - 0x97b8], eax
push ecx
push eax
call fcn.00412ee0
mov edi, dword [ebp - 0x97bc]
add esp, 0xc
push dword [ebp - 0x97d0]
push dword [ebp - 0x97b8]
push edi
call fcn.0040e8c8
add esp, 0xc
push edi
call fcn.0040ff7b
mov eax, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97b8]
pop ecx
test eax, eax
je 0x407b7c
push edi
push 8
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
neg al
sbb al, al
inc al
mov byte [ebp - 0x97a1], al
jmp 0x407b82
mov al, byte [ebp - 0x97a1]
test al, al
je 0x407b93
lea eax, [ebp - 0x1218]
push eax
call fcn.0040f19b
pop ecx
push edi
call fcn.0040d5a5
mov edi, dword [ebp - 0x97e0]
pop ecx
mov al, byte [ebp - 0x97a1]
test al, al
je 0x407bbb
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x407c02
xor ecx, ecx
push ecx
push 3
jmp 0x407bf7
lea eax, [ebp - 0xa18]
push eax
call fcn.0040f19b
pop ecx
lea eax, [ebp - 0xa18]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.0040f216
pop ecx
pop ecx
test eax, eax
je 0x407c0f
call fcn.0040668e
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x407c02
push str.Error_during_renaming_tmp_file
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
test ebx, ebx
je 0x407c56
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x407c56
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffd
push eax
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x407c47
xor ecx, ecx
push ecx
push 9
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
test ebx, ebx
je 0x407c52
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor ebx, ebx
mov edi, ebx
test esi, esi
je 0x407c61
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040cacf
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp - 0x97b4]
jmp 0x407c54