Function at 0x407a68
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 0x4284ca
mov eax, dword fs:[0]
push eax
mov eax, 0x97d4
call fcn.0041d920
mov eax, dword [0x434558]
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.004072ee
cmp dword [ebp - 0x7a5c], 0
jne 0x407b02
test ebx, ebx
je 0x407afa
push str.Protocol_not_supported
push 5
push edi
call ebx
add esp, 0xc
xor eax, eax
inc eax
jmp 0x408624
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 0x407b58
test ebx, ebx
je 0x407b50
push str.InternetConnect___failed
push 5
push edi
call ebx
add esp, 0xc
or edi, 0xffffffff
jmp 0x408622
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 0x407b5c
lea edx, [ebp - 0x8a5c]
mov esi, edx
mov cx, word [edx]
add edx, 2
cmp cx, bx
jne 0x407b7c
lea edi, [ebp - 0x7a18]
sub edx, esi
sub edi, 2
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x407b92
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 0x408642
push ebx
push 0x400000
lea ecx, [ebp - 0x97dc]
mov dword [ebp - 0x97dc], 0x430064
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 0x407c1a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x407c1a
push 0x11
pop edi
jmp 0x4081ac
mov edi, dword [ebp - 0x97a8]
mov ecx, edi
push ebx
call fcn.004078fc
mov ecx, edi
call fcn.00407896
push 0x13
xor eax, eax
push ebx
mov dword [ebp - 0x97c4], eax
call fcn.004077a9
cmp eax, 0xc8
je 0x407cfe
mov esi, dword [ebp - 0x97b4]
add eax, 0xfffffed3
cmp eax, 1
ja 0x407cf6
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov esi, eax
mov dword [ebp - 0x97b4], esi
test ebx, ebx
je 0x407c84
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.0040782a
lea edx, [ebp - 0x6a18]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x407c98
mov eax, dword [ebp - 0x97b0]
cmp word [ebp - 0x6a18], si
jne 0x407cd4
test eax, eax
je 0x407ccc
push str.Redirected_to_unknown_location
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
or edi, 0xffffffff
jmp 0x4085c3
push dword [ebp - 0x97ac]
mov ecx, edi
push eax
push dword [ebp - 0x97b8]
lea eax, [ebp - 0x6a18]
push eax
call fcn.00407a68
mov edi, eax
jmp 0x4085c3
push 0xfffffffffffffffe
pop edi
jmp 0x4085c3
push 5
push ebx
call fcn.004077a9
mov dword [ebp - 0x97c4], eax
test ebx, ebx
je 0x407d23
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x97d4], ebx
jmp 0x407d25
xor eax, eax
push str.Content_Type:
mov ecx, edi
mov byte [ebp - 0x97a2], al
call fcn.0040782a
lea edx, [ebp - 0x218]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x407d3f
lea eax, [ebp - 0x218]
push str.text_html
push eax
call fcn.0040f248
pop ecx
pop ecx
test eax, eax
jne 0x407d7c
lea eax, [ebp - 0x218]
push str.text_plain
push eax
call fcn.0040f248
pop ecx
pop ecx
test eax, eax
je 0x407db4
mov esi, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97ac]
mov byte [ebp - 0x97a2], 1
test esi, esi
je 0x407dc0
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 0x407dc0
jmp 0x407ea1
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.00413f70
add esp, 0xc
push 0x2f
pop eax
push eax
lea eax, [ebp - 0x925c]
push eax
call fcn.0040e57e
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x407e31
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 0x407e07
push esi
push ecx
call fcn.0040e57e
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x407df2
mov esi, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97ac]
lea eax, [ebp - 0x1618]
push 0x3f
push eax
call fcn.0040e57e
pop ecx
pop ecx
test eax, eax
je 0x407e4a
xor ecx, ecx
mov word [eax], cx
test esi, esi
je 0x407e6b
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 0x407e71
mov al, byte [ebp - 0x97a1]
test al, al
jne 0x407e96
test esi, esi
je 0x407ea9
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 0x407ea9
xor eax, eax
push eax
push 3
push edi
call esi
add esp, 0xc
or edi, 0xffffffff
jmp 0x4081ac
mov edx, dword [ebp - 0x97b8]
test edx, edx
je 0x407ed5
xor eax, eax
cmp word [edx], ax
je 0x407ed5
lea ecx, [ebp - 0xa18]
sub ecx, edx
movzx eax, word [edx]
mov word [ecx + edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x407ec2
xor edx, edx
jmp 0x407ef0
xor edx, edx
mov ecx, edx
movzx eax, word [ecx + 0x4300fc]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0xa1a], ax
test ax, ax
jne 0x407ed9
cmp word [ebp - 0xa18], 0
mov ecx, edx
push 0x5c
pop esi
je 0x407f1f
push 0x2f
lea eax, [ebp - 0xa18]
pop edi
cmp word [eax], di
jne 0x407f10
mov word [eax], si
inc ecx
lea eax, [ebp - 0xa18]
lea eax, [eax + ecx*2]
cmp word [eax], dx
jne 0x407f08
cmp word [ebp + ecx*2 - 0xa1a], si
jne 0x407f65
lea edx, [ebp - 0x1618]
xor ecx, ecx
mov esi, edx
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x407f33
lea edi, [ebp - 0xa18]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x407f49
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 0x407f67
lea edi, [ebp - 0x1218]
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, dx
jne 0x407f88
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.0040782a
lea edx, [ebp - 0x1a18]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x407fb6
lea ecx, [ebp - 0x1a18]
call fcn.004070bf
lea ecx, [ebp - 0xa18]
mov dword [ebp - 0x97cc], eax
mov dword [ebp - 0x97bc], edx
call fcn.004072a2
mov edi, eax
mov dword [ebp - 0x97b8], edx
xor eax, eax
push 0x30
push eax
lea eax, [ebp - 0x7a58]
push eax
call fcn.00413f70
mov eax, dword [ebp - 0x97b8]
mov ecx, edi
add esp, 0xc
or ecx, eax
je 0x408121
cmp edi, dword [ebp - 0x97cc]
jne 0x408121
cmp eax, dword [ebp - 0x97bc]
jne 0x408121
lea eax, [ebp - 0x7a58]
push eax
lea eax, [ebp - 0xa18]
push eax
call fcn.0040edce
pop ecx
pop ecx
test eax, eax
jne 0x408121
mov eax, dword [ebp - 0x7a44]
cmp eax, dword [ebp - 0x97c4]
jne 0x408121
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x408076
push str.File_exists__aborting
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
cmp byte [ebp - 0x97a2], 0
je 0x408118
xor eax, eax
push eax
lea eax, [ebp - 0xa18]
push 0x8002
push eax
call fcn.0040ea04
add esp, 0xc
mov dword [ebp - 0x97cc], eax
push eax
call fcn.0040e62c
mov edi, eax
pop ecx
lea esi, [edi + 1]
push esi
call fcn.0040ce9f
pop ecx
push esi
xor ecx, ecx
mov dword [ebp - 0x97bc], eax
push ecx
push eax
call fcn.00413f70
mov esi, dword [ebp - 0x97cc]
add esp, 0xc
push edi
mov edi, dword [ebp - 0x97bc]
push edi
push esi
call fcn.0040f799
add esp, 0xc
push esi
call fcn.00411060
mov eax, dword [ebp - 0x97b0]
pop ecx
test eax, eax
je 0x408111
push edi
push 8
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
neg al
sbb al, al
inc al
je 0x408111
lea eax, [ebp - 0xa18]
push eax
call fcn.0041006c
pop ecx
push edi
call fcn.0040e425
pop ecx
xor eax, eax
mov edi, eax
jmp 0x4081ac
xor eax, eax
lea ecx, [ebp - 0x1218]
mov dword [ebp - 0x97c0], eax
call fcn.004072a2
or eax, edx
je 0x408174
lea eax, [ebp - 0x7a58]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.0040edce
pop ecx
pop ecx
test eax, eax
jne 0x408174
push eax
lea eax, [ebp - 0x1218]
push 0x8002
push eax
call fcn.0040ea04
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x7a44]
mov dword [ebp - 0x97c0], eax
jmp 0x40819b
lea eax, [ebp - 0x1218]
push eax
call fcn.0041006c
mov dword [esp], 0x180
lea eax, [ebp - 0x1218]
push 0x8302
push eax
call fcn.0040ea04
mov dword [esi + 0xc], eax
or edi, 0xffffffff
add esp, 0xc
mov dword [ebp - 0x97e0], edi
cmp dword [esi + 0xc], edi
jne 0x4081b7
mov esi, dword [ebp - 0x97b4]
jmp 0x4085c3
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 0x408439
xor ecx, ecx
lea eax, [ebp - 0x97dc]
push ecx
push 0x400000
push eax
push ecx
push ecx
lea eax, [ebp - 0x7a18]
push eax
push 0x43015c
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 0x40823d
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 0x408271
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4082b7
mov ecx, dword [ebp - 0x97a8]
push ebx
call fcn.004078fc
mov ecx, dword [ebp - 0x97a8]
call fcn.00407896
push 0x13
push ebx
call fcn.004077a9
push 0x64
cdq
pop ecx
idiv ecx
cmp eax, 2
je 0x4082d4
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x4082b7
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.00411060
mov eax, dword [ebp - 0x97a8]
pop ecx
mov dword [eax + 0xc], edi
jmp 0x4085c3
mov ecx, dword [ebp - 0x97a8]
push str.Content_Range:_bytes
call fcn.0040782a
lea edx, [ebp - 0x118]
sub edx, eax
movzx ecx, word [eax]
mov word [eax + edx], cx
lea eax, [eax + 2]
test cx, cx
jne 0x4082ec
lea eax, [ebp - 0x118]
push eax
call fcn.0040ea31
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.00410471
add esp, 0xc
push 0x2800
call fcn.0040ce9f
mov dword [ebp - 0x97c8], esi
mov esi, dword [ebp - 0x97b0]
pop ecx
mov dword [ebp - 0x97b8], eax
jmp 0x408348
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 0x408366
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x97c8], 0
je 0x4083cc
push dword [ebp - 0x97c8]
mov eax, dword [ebp - 0x97a8]
push dword [ebp - 0x97b8]
push dword [eax + 0xc]
call fcn.00410607
mov eax, dword [ebp - 0x97c8]
add esp, 0xc
add dword [ebp - 0x97c0], eax
test esi, esi
je 0x4083be
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 0x4083c4
mov al, byte [ebp - 0x97a1]
test al, al
je 0x408342
push dword [ebp - 0x97b8]
call fcn.0040e425
mov esi, dword [ebp - 0x97b4]
pop ecx
mov ecx, dword [ebp - 0x97c0]
cmp ecx, dword [ebp - 0x97c4]
je 0x408439
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x40840e
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.0040f4db
mov eax, dword [ebp - 0x97a8]
push dword [eax + 0xc]
call fcn.00411060
mov eax, dword [ebp - 0x97a8]
mov dword [eax + 0xc], edi
jmp 0x4085c0
mov eax, dword [ebp - 0x97a8]
push ecx
push dword [eax + 0xc]
call fcn.0040f4db
mov eax, dword [ebp - 0x97a8]
push dword [eax + 0xc]
call fcn.00411060
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.00410075
cmp byte [ebp - 0x97a2], 0
mov eax, dword [ebp - 0x97a8]
pop ecx
pop ecx
mov dword [eax + 0xc], edi
je 0x408561
xor eax, eax
push eax
lea eax, [ebp - 0x1218]
push 0x8002
push eax
call fcn.0040ea04
add esp, 0xc
mov dword [ebp - 0x97bc], eax
push eax
call fcn.0040e62c
pop ecx
mov dword [ebp - 0x97d0], eax
lea edi, [eax + 1]
push edi
call fcn.0040ce9f
pop ecx
push edi
xor ecx, ecx
mov dword [ebp - 0x97b8], eax
push ecx
push eax
call fcn.00413f70
mov edi, dword [ebp - 0x97bc]
add esp, 0xc
push dword [ebp - 0x97d0]
push dword [ebp - 0x97b8]
push edi
call fcn.0040f799
add esp, 0xc
push edi
call fcn.00411060
mov eax, dword [ebp - 0x97b0]
mov edi, dword [ebp - 0x97b8]
pop ecx
test eax, eax
je 0x40853d
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 0x408543
mov al, byte [ebp - 0x97a1]
test al, al
je 0x408554
lea eax, [ebp - 0x1218]
push eax
call fcn.0041006c
pop ecx
push edi
call fcn.0040e425
mov edi, dword [ebp - 0x97e0]
pop ecx
mov al, byte [ebp - 0x97a1]
test al, al
je 0x40857c
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x4085c3
xor ecx, ecx
push ecx
push 3
jmp 0x4085b8
lea eax, [ebp - 0xa18]
push eax
call fcn.0041006c
pop ecx
lea eax, [ebp - 0xa18]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.004102fb
pop ecx
pop ecx
test eax, eax
je 0x4085d0
call fcn.0040703f
mov eax, dword [ebp - 0x97b0]
test eax, eax
je 0x4085c3
push str.Error_during_renaming_tmp_file
push 5
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
test ebx, ebx
je 0x408617
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x408617
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 0x408608
xor ecx, ecx
push ecx
push 9
push dword [ebp - 0x97ac]
call eax
add esp, 0xc
test ebx, ebx
je 0x408613
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor ebx, ebx
mov edi, ebx
test esi, esi
je 0x408622
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.0040d946
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp - 0x97b4]
jmp 0x408615