Function at 0x797394
Capabilities:
Check http status code
Connect to http server
Delete file
Get common file path
Get http content length
Move file
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x50b
push 0
push 0
dec ecx
jne 0x79739d
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
call fcn.0040b148
mov eax, dword [ebp + 0xc]
call fcn.0040b148
xor eax, eax
push ebp
push 0x7987a5
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x31], 0
xor eax, eax
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 4]
call fcn.0040b48c
lea ecx, [ebp - 0x14]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x30]
call fcn.00796b9c
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x90], 0
je 0x797414
push 3
push 0
mov ecx, dword [ebp - 0x14]
mov edx, 0x393
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x797428
push 3
push 0
mov ecx, dword [ebp - 0x18]
mov edx, 0x393
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
mov eax, dword [ebp - 0x30]
cmp word [eax + 0x11a], 0
je 0x797662
mov byte [ebp - 0x53], 0
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 0xc]
call fcn.0040c130
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x53]
push eax
lea eax, [ebp - 0x31]
push eax
mov ebx, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, dword [ebx + 0x11c]
call dword [ebx + 0x118]
cmp byte [ebp - 0x53], 0
je 0x797662
mov dl, 1
mov eax, dword [ebp - 0x14]
call fcn.00431b38
test al, al
je 0x797662
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x68]
cmp byte [ebp + 8], 0
je 0x7974d1
lea edx, [ebp - 0x2794]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x2794]
mov dword [ebp - 0x6c], eax
mov ecx, 1
mov edx, dword [ebp - 0x6c]
mov eax, 0x7987c8
call fcn.0040c454
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
sete al
jmp 0x7974d3
xor eax, eax
test al, al
je 0x797560
lea edx, [ebp - 0x2798]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x2798]
mov dword [ebp - 0x74], eax
mov ecx, 1
mov edx, dword [ebp - 0x74]
mov eax, 0x7987e0
call fcn.0040c454
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
jne 0x797560
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x797559
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x279c]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call fcn.0040bbb8
mov eax, dword [ebp - 0x279c]
lea edx, [ebp - 0x24]
call fcn.007965f8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x797560
lea eax, [ebp - 0x24]
call fcn.0040b054
pop eax
jmp eax
cmp byte [ebp + 8], 0
je 0x7975d1
lea edx, [ebp - 0x27a0]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x27a0]
mov dword [ebp - 0x7c], eax
mov ecx, 1
mov edx, dword [ebp - 0x7c]
mov eax, 0x7987c8
call fcn.0040c454
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
je 0x7975d1
push 3
push 0
mov ecx, dword [ebp - 0x14]
mov edx, 0x3c5
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
call fcn.00780b68
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1c1], 0
jne 0x7975d1
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
call sub.kernel32.dll_DeleteFileW
cmp byte [ebp + 8], 0
je 0x7986bd
lea edx, [ebp - 0x27a4]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x27a4]
mov dword [ebp - 0x84], eax
mov ecx, 1
mov edx, dword [ebp - 0x84]
mov eax, 0x7987e0
call fcn.0040c454
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0
je 0x7986bd
push 3
push 0
mov ecx, dword [ebp - 0x14]
mov edx, 0x3c5
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
call fcn.00794ebc
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1c1], 0
jne 0x7986bd
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
call sub.kernel32.dll_DeleteFileW
jmp 0x7986bd
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 2
jne 0x7978ea
lea edx, [ebp - 0x27a8]
mov eax, dword [ebp + 0xc]
call fcn.00432284
cmp dword [ebp - 0x27a8], 0
jne 0x797699
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 0xc]
call fcn.0040c130
jmp 0x7976a4
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
call fcn.0040b48c
push 0
mov eax, dword [ebp - 0x14]
call fcn.0040becc
mov edx, eax
lea eax, [ebp - 0x27ac]
call fcn.0040bf2c
mov eax, dword [ebp - 0x27ac]
push eax
mov eax, dword [ebp - 4]
call fcn.0040becc
mov edx, eax
lea eax, [ebp - 0x27b0]
call fcn.0040bf2c
mov edx, dword [ebp - 0x27b0]
mov eax, dword [ebp - 0x30]
pop ecx
call fcn.00796fac
test al, al
je 0x7978e1
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x68]
cmp byte [ebp + 8], 0
je 0x797740
lea edx, [ebp - 0x27b4]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x27b4]
mov dword [ebp - 0x8c], eax
mov ecx, 1
mov edx, dword [ebp - 0x8c]
mov eax, 0x7987c8
call fcn.0040c454
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
sete al
jmp 0x797742
xor eax, eax
test al, al
je 0x7977db
lea edx, [ebp - 0x27b8]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x27b8]
mov dword [ebp - 0x94], eax
mov ecx, 1
mov edx, dword [ebp - 0x94]
mov eax, 0x7987e0
call fcn.0040c454
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
jne 0x7977db
xor eax, eax
mov dword [ebp - 0x28], eax
xor eax, eax
push ebp
push 0x7977d4
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x27bc]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call fcn.0040bbb8
mov eax, dword [ebp - 0x27bc]
lea edx, [ebp - 0x28]
call fcn.007965f8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7977db
lea eax, [ebp - 0x28]
call fcn.0040b054
pop eax
jmp eax
cmp byte [ebp + 8], 0
je 0x797858
lea edx, [ebp - 0x27c0]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x27c0]
mov dword [ebp - 0x9c], eax
mov ecx, 1
mov edx, dword [ebp - 0x9c]
mov eax, 0x7987c8
call fcn.0040c454
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
je 0x797858
push 3
push 0
mov ecx, dword [ebp - 0x14]
mov edx, 0x3c5
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
call fcn.00780b68
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1c1], 0
jne 0x797858
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
call sub.kernel32.dll_DeleteFileW
cmp byte [ebp + 8], 0
je 0x7978d8
lea edx, [ebp - 0x27c4]
mov eax, dword [ebp - 0x14]
call fcn.004300b0
mov eax, dword [ebp - 0x27c4]
mov dword [ebp - 0xa4], eax
mov ecx, 1
mov edx, dword [ebp - 0xa4]
mov eax, 0x7987e0
call fcn.0040c454
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
je 0x7978d8
push 3
push 0
mov ecx, dword [ebp - 0x14]
mov edx, 0x3c5
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
call fcn.00794ebc
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1c1], 0
jne 0x7978d8
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
call sub.kernel32.dll_DeleteFileW
mov byte [ebp - 0x31], 1
jmp 0x7986bd
mov byte [ebp - 0x31], 0
jmp 0x7986bd
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x84]
push eax
lea eax, [ebp - 0x27c8]
push eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x80]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x30]
call fcn.00796e54
mov edx, dword [ebp - 0x27c8]
lea eax, [ebp - 4]
call fcn.0040b48c
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x89]
cmp al, 3
jne 0x797b75
xor ebx, ebx
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x60], 0
je 0x797a22
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x60]
mov eax, dword [ebp - 0x30]
call fcn.00796a54
push 3
push 0
mov ecx, dword [ebp - 0x1c]
mov edx, 0x3ce
mov eax, dword [ebp - 0x30]
mov esi, dword [eax]
call dword [esi + 0x48]
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x54], 0
je 0x797a22
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x54]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0x27cc]
push eax
lea eax, [ebp - 0x27d0]
mov edx, dword [ebp - 0x1c]
call fcn.0040bfd0
mov edx, dword [ebp - 0x27d0]
mov eax, dword [ebp - 0x30]
movzx ecx, word [eax + 0x1fa]
mov eax, dword [ebp - 0x30]
call fcn.00795d84
mov eax, dword [ebp - 0x27cc]
call fcn.0040ba84
mov dword [ebp - 0xb0], eax
push 1
push 0
push 0
mov eax, dword [ebp - 0xb0]
call fcn.0040b570
push eax
mov eax, dword [ebp - 0xb0]
push eax
mov eax, dword [ebp - 0xac]
push eax
call sub.libssh2.dll_libssh2_sftp_open_ex
add esp, 0x18
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x797a09
mov eax, dword [ebp - 0x5c]
push eax
call sub.libssh2.dll_libssh2_sftp_close_handle
pop ecx
mov dword [ebp - 0xb8], eax
jmp 0x797a22
push 3
push 8
mov ecx, dword [ebp - 0x1c]
mov edx, 0x3cf
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x7986bd
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x797a2c
mov eax, dword [eax - 4]
test eax, eax
jle 0x797a6f
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x797a3a
mov eax, dword [eax - 4]
mov edx, dword [ebp - 0x1c]
cmp word [edx + eax*2 - 2], 0x2f
jne 0x797a55
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
call fcn.0040c130
jmp 0x797a87
push dword [ebp - 0x1c]
push 0x7987f8
push dword [ebp - 0x14]
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040c1b8
jmp 0x797a87
push dword [ebp - 0x1c]
push 0x7987f8
push dword [ebp - 0x14]
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040c1b8
mov eax, dword [ebp - 0x30]
mov esi, dword [eax + 0x54]
lea eax, [ebp - 0x27d4]
push eax
lea eax, [ebp - 0x27d8]
mov edx, dword [ebp - 0x20]
call fcn.0040bfd0
mov edx, dword [ebp - 0x27d8]
mov eax, dword [ebp - 0x30]
movzx ecx, word [eax + 0x1fa]
mov eax, dword [ebp - 0x30]
call fcn.00795d84
mov eax, dword [ebp - 0x27d4]
call fcn.0040ba84
mov edi, eax
lea eax, [ebp - 0x2790]
push eax
push 0
mov eax, edi
call fcn.0040b570
push eax
push edi
push esi
call sub.libssh2.dll_libssh2_sftp_stat_ex
add esp, 0x14
test eax, eax
jne 0x798028
mov eax, dword [ebp - 0x2788]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x30]
mov esi, dword [eax + 0x54]
lea eax, [ebp - 0x27dc]
push eax
lea eax, [ebp - 0x27e0]
mov edx, dword [ebp - 0x20]
call fcn.0040bfd0
mov edx, dword [ebp - 0x27e0]
mov eax, dword [ebp - 0x30]
movzx ecx, word [eax + 0x1fa]
mov eax, dword [ebp - 0x30]
call fcn.00795d84
mov eax, dword [ebp - 0x27dc]
call fcn.0040ba84
mov edi, eax
push 0
push 0
push 1
mov eax, edi
call fcn.0040b570
push eax
push edi
push esi
call sub.libssh2.dll_libssh2_sftp_open_ex
add esp, 0x18
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x798028
push 0xd
call sub.kernel32.dll_GetLastError
push eax
mov ecx, dword [ebp - 0x14]
mov edx, 0x3b2
mov eax, dword [ebp - 0x30]
mov esi, dword [eax]
call dword [esi + 0x48]
jmp 0x798028
test al, al
jne 0x797c7d
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x60], 0
je 0x797bed
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x150], 0
jne 0x797bed
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x60]
mov eax, dword [ebp - 0x30]
call fcn.00796a54
push 3
push 0
mov ecx, dword [ebp - 0x1c]
mov edx, 0x3ce
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
mov eax, dword [ebp - 0x1c]
call fcn.0040becc
push eax
push esi
call sub.wininet.dll_FtpSetCurrentDirectoryW
test eax, eax
jne 0x797be3
push 3
push 8
mov ecx, dword [ebp - 0x1c]
mov edx, 0x3cf
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x7986bd
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x150], 1
push 0
push 0x84000000
lea eax, [ebp - 0x2764]
push eax
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
push esi
call sub.wininet.dll_FtpFindFirstFileW
mov ebx, eax
test ebx, ebx
jne 0x797c28
push 0xb
call sub.kernel32.dll_GetLastError
push eax
mov ecx, dword [ebp - 0x14]
mov edx, 0x39d
mov eax, dword [ebp - 0x30]
mov edi, dword [eax]
call dword [edi + 0x48]
test ebx, ebx
je 0x797c32
push ebx
call sub.wininet.dll_InternetCloseHandle
mov eax, dword [ebp - 0x2744]
mov dword [ebp - 0x50], eax
push 0
push 0x84000002
push 0x80000000
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
push esi
call sub.wininet.dll_FtpOpenFileW
mov ebx, eax
test ebx, ebx
jne 0x798028
push 0xd
call sub.kernel32.dll_GetLastError
push eax
mov ecx, dword [ebp - 0x14]
mov edx, 0x3b2
mov eax, dword [ebp - 0x30]
mov esi, dword [eax]
call dword [esi + 0x48]
jmp 0x798028
lea edx, [ebp - 0x27e4]
mov eax, dword [ebp - 4]
call fcn.004300b0
mov eax, dword [ebp - 0x27e4]
mov ecx, 1
mov edx, eax
mov eax, 0x798808
call fcn.0040c454
test eax, eax
jle 0x797d5c
push 0
push 0
push 3
push 0
push 0
push 0x1bb
mov eax, dword [ebp - 4]
call fcn.0040becc
push eax
push esi
call sub.wininet.dll_InternetConnectW
mov dword [ebp - 0x44], eax
push 0
push 0x800000
push 0
push 0
push 0
push 0x798814
push 0x798818
mov eax, dword [ebp - 0x44]
push eax
call sub.wininet.dll_HttpOpenRequestW
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x797d5c
mov dword [ebp - 0x50], 4
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x58]
push eax
push 0x1f
mov eax, dword [ebp - 0x40]
push eax
call sub.wininet.dll_InternetQueryOptionW
test eax, eax
je 0x797d4b
mov eax, dword [ebp - 0x58]
or eax, 0x100
or eax, 0x1000
or eax, 0x2000
or eax, 0x10000
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x50]
push eax
lea eax, [ebp - 0x58]
push eax
push 0x1f
mov eax, dword [ebp - 0x40]
push eax
call sub.wininet.dll_InternetSetOptionW
test eax, eax
jne 0x797d4b
mov eax, dword [ebp - 0x30]
call fcn.00795e2c
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x40]
push eax
call sub.wininet.dll_HttpSendRequestW
mov dword [ebp - 0x58], 0x84000100
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x184], 0
je 0x797d76
or dword [ebp - 0x58], 0x400000
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x185], 0
je 0x797d89
or dword [ebp - 0x58], 0x20000000
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1e5], 1
jne 0x797daf
mov eax, dword [ebp - 0x58]
or eax, 0x2000
or eax, 0x1000
or eax, 0x100
or eax, 0x10000
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1dc], 0
jne 0x797e6c
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x94], 0
je 0x797dd8
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x6c], 0
jne 0x797e6c
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 0x94]
call fcn.0040b48c
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 0x6c]
call fcn.0040b48c
lea ecx, [ebp - 0x27ec]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x30]
call fcn.00796d20
mov ecx, dword [ebp - 0x27ec]
lea eax, [ebp - 0x27e8]
mov edx, 0x79882c
call fcn.0040c130
mov eax, dword [ebp - 0x27e8]
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0xc]
call fcn.007814c0
test al, al
jne 0x797e4e
push 0
push 0
mov ecx, 0x798850
mov edx, 0x3bc
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x7986bd
mov eax, dword [ebp - 0x30]
add eax, 0x94
mov edx, dword [ebp - 0xc]
call fcn.0040b444
mov eax, dword [ebp - 0x30]
add eax, 0x6c
mov edx, dword [ebp - 0x10]
call fcn.0040b444
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x94], 0
jne 0x797e81
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x6c], 0
je 0x797ed5
push 0x798890
mov eax, dword [ebp - 0x30]
push dword [eax + 0x94]
push 0x7988c8
mov eax, dword [ebp - 0x30]
push dword [eax + 0x6c]
lea eax, [ebp - 0x27f4]
mov edx, 3
call fcn.0040c1b8
mov eax, dword [ebp - 0x27f4]
lea edx, [ebp - 0x27f0]
call fcn.00780fd4
push dword [ebp - 0x27f0]
push 0x7988d8
lea eax, [ebp - 8]
mov edx, 3
call fcn.0040c1b8
jmp 0x797edd
lea eax, [ebp - 8]
call fcn.0040b054
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x797ee7
mov ebx, dword [ebx - 4]
push 0
mov eax, dword [ebp - 0x58]
push eax
push ebx
mov eax, dword [ebp - 8]
call fcn.0040becc
push eax
mov eax, dword [ebp - 4]
call fcn.0040becc
push eax
push esi
call sub.wininet.dll_InternetOpenUrlW
mov ebx, eax
mov dword [ebp - 0x48], 4
xor eax, eax
mov dword [ebp - 0x4c], eax
test ebx, ebx
je 0x798028
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x50]
push eax
push 0x20000013
push ebx
call sub.wininet.dll_HttpQueryInfoW
cmp dword [ebp - 0x50], 0x191
jne 0x797fef
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1dc], 1
jne 0x797fef
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 0x94]
call fcn.0040b48c
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 0x6c]
call fcn.0040b48c
lea ecx, [ebp - 0x27fc]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x30]
call fcn.00796d20
mov ecx, dword [ebp - 0x27fc]
lea eax, [ebp - 0x27f8]
mov edx, 0x79882c
call fcn.0040c130
mov eax, dword [ebp - 0x27f8]
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0xc]
call fcn.007814c0
test al, al
je 0x797fd4
mov eax, dword [ebp - 0x30]
add eax, 0x94
mov edx, dword [ebp - 0xc]
call fcn.0040b444
mov eax, dword [ebp - 0x30]
add eax, 0x6c
mov edx, dword [ebp - 0x10]
call fcn.0040b444
push ebx
call sub.wininet.dll_InternetCloseHandle
jmp 0x797e6c
push 0
push 0
mov ecx, 0x798850
mov edx, 0x3bc
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x7986bd
cmp dword [ebp - 0x50], 0x12c
jb 0x798028
push 6
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x50]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x2800]
call fcn.00430de4
mov ecx, dword [ebp - 0x2800]
mov edx, 0x394
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x7986bd
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 3
je 0x798038
test ebx, ebx
je 0x79804a
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 3
jne 0x79806b
cmp dword [ebp - 0x60], 0
jne 0x79806b
mov eax, dword [ebp - 0x30]
call fcn.00795e2c
push 2
push 1
mov ecx, dword [ebp - 0x18]
mov edx, 0x395
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
jmp 0x7986bd
lea ecx, [ebp - 0x2804]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x30]
call fcn.00796b9c
mov ecx, dword [ebp - 0x2804]
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
call fcn.0040c130
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x171], 0
je 0x7980c8
lea eax, [ebp - 0x22c2]
push eax
push 0
push 0x7988e4
lea edx, [ebp - 0x2808]
mov eax, dword [ebp - 0x30]
call fcn.00794e2c
mov eax, dword [ebp - 0x2808]
call fcn.0040becc
push eax
call sub.kernel32.dll_GetTempFileNameW
jmp 0x7980ea
lea eax, [ebp - 0x22c2]
push eax
push 0
push 0x7988e4
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x180]
call fcn.0040becc
push eax
call sub.kernel32.dll_GetTempFileNameW
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 3
je 0x798137
lea eax, [ebp - 0x280c]
lea edx, [ebp - 0x22c2]
mov ecx, 0x105
call fcn.0040bf80
mov edx, dword [ebp - 0x280c]
lea eax, [ebp - 0x2514]
call fcn.00408048
call fcn.004072ec
mov edx, 1
lea eax, [ebp - 0x2514]
call fcn.004085bc
call fcn.004072ec
mov dword [ebp - 0x38], 0x1000
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 1
jne 0x798172
xor eax, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], 4
xor eax, eax
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x50]
push eax
push 0x20000005
push ebx
call sub.wininet.dll_HttpQueryInfoW
xor esi, esi
xor eax, eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x1b1]
mov byte [ebp - 0x51], al
mov byte [ebp - 0x52], 0
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 3
jne 0x79832a
push 0xff00
lea eax, [ebp - 0x2810]
lea edx, [ebp - 0x22c2]
mov ecx, 0x105
call fcn.0040bf80
mov ecx, dword [ebp - 0x2810]
mov dl, 1
mov eax, dword [0x4905a8]
call fcn.004baeb8
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x38]
call fcn.00407108
mov dword [ebp - 0x68], eax
xor edx, edx
push ebp
push 0x798293
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x8cd198]
mov eax, dword [eax]
call fcn.005cf924
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x60]
push eax
call sub.libssh2.dll_libssh2_sftp_read
add esp, 0xc
mov ebx, eax
test ebx, ebx
jle 0x79824b
mov edx, dword [ebp - 0x68]
mov ecx, ebx
mov eax, dword [ebp - 0x64]
mov edi, dword [eax]
call dword [edi + 0x1c]
test eax, eax
jle 0x79821c
add esi, eax
mov eax, dword [ebp - 0x50]
push eax
mov ecx, esi
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
mov edi, dword [eax]
call dword [edi + 0x58]
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x1b1]
mov byte [ebp - 0x51], al
lea edx, [ebp - 0x51]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x5c]
mov byte [ebp - 0x31], 1
jmp 0x798255
test ebx, ebx
jge 0x798255
mov byte [ebp - 0x52], 1
jmp 0x798269
test ebx, ebx
je 0x798269
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1b1], 0
je 0x7981e3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x798350
mov eax, dword [ebp - 0x68]
call fcn.00407124
mov eax, dword [ebp - 0x60]
push eax
call sub.libssh2.dll_libssh2_sftp_close_handle
pop ecx
mov eax, dword [ebp - 0x64]
call fcn.00409258
pop eax
jmp eax
mov eax, dword [0x8cd198]
mov eax, dword [eax]
call fcn.005cf924
lea eax, [ebp - 0x38]
push eax
push 0x1000
lea eax, [ebp - 0x20b8]
push eax
push ebx
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x7982c6
mov byte [ebp - 0x52], 1
jmp 0x79833a
cmp dword [ebp - 0x38], 0
jbe 0x7982f0
cmp dword [ebp - 0x38], 0x1000
ja 0x7982f0
push 0
lea edx, [ebp - 0x20b8]
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x2514]
call fcn.00408264
call fcn.004072ec
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x50]
push eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
mov esi, dword [eax]
call dword [esi + 0x58]
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 0x1b1]
mov byte [ebp - 0x51], al
lea edx, [ebp - 0x51]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x5c]
cmp dword [ebp - 0x38], 0
jbe 0x79832a
mov byte [ebp - 0x31], 1
cmp dword [ebp - 0x38], 0
jbe 0x79833a
cmp byte [ebp - 0x51], 0
je 0x79829a
push ebx
call sub.wininet.dll_InternetCloseHandle
lea eax, [ebp - 0x2514]
call fcn.00408284
call fcn.004072ec
mov eax, dword [ebp - 0x30]
movzx edx, byte [ebp - 0x51]
mov byte [eax + 0x1b1], dl
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x89], 1
jne 0x798399
cmp dword [ebp - 0x50], 0
jbe 0x798399
cmp byte [ebp - 0x52], 0
jne 0x798399
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x50]
setne byte [ebp - 0x52]
cmp byte [ebp - 0x52], 0
je 0x798399
push 0x14
push 0xa
mov ecx, dword [ebp - 4]
mov edx, 0x38c
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
movzx eax, byte [ebp - 0x51]
or al, byte [ebp - 0x52]
je 0x7983fd
lea edx, [ebp - 0x2814]
lea eax, [ebp - 0x22c2]
call fcn.0043287c
mov eax, dword [ebp - 0x2814]
call fcn.00431f14
test al, al
jne 0x7983f4
lea edx, [ebp - 0x281c]
lea eax, [ebp - 0x22c2]
call fcn.0043287c
mov ecx, dword [ebp - 0x281c]
lea eax, [ebp - 0x2818]
mov edx, 0x7988fc
call fcn.0040c130
mov eax, dword [ebp - 0x2818]
call fcn.00794838
mov byte [ebp - 0x31], 0
jmp 0x7986bd
mov dl, 1
mov eax, dword [ebp - 0x14]
call fcn.00431b38
test al, al
je 0x798461
mov eax, dword [ebp - 0x14]
call fcn.00431f14
test al, al
jne 0x798461
mov eax, dword [ebp - 0x14]
call fcn.00796f84
mov eax, dword [ebp - 0x14]
call fcn.00431f14
test al, al
jne 0x798461
mov byte [ebp - 0x31], 0
push 0x13
push 6
mov ecx, dword [ebp - 0x14]
mov edx, 0x3cc
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
lea eax, [ebp - 0x2820]
mov ecx, dword [ebp - 0x14]
mov edx, 0x7988fc
call fcn.0040c130
mov eax, dword [ebp - 0x2820]
call fcn.00794838
lea edx, [ebp - 0x2824]
lea eax, [ebp - 0x22c2]
call fcn.0043287c
mov ebx, dword [ebp - 0x2824]
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
mov dword [ebp - 0x2828], ebx
mov eax, dword [ebp - 0x2828]
call fcn.0040becc
push eax
call sub.kernel32.dll_MoveFileW
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x798534
mov byte [ebp - 0x31], 0
push 0x13
push 7
lea eax, [ebp - 0x2830]
lea edx, [ebp - 0x22c2]
mov ecx, 0x105
call fcn.0040bf80
push dword [ebp - 0x2830]
push 0x798938
push dword [ebp - 0x14]
lea eax, [ebp - 0x282c]
mov edx, 3
call fcn.0040c1b8
mov ecx, dword [ebp - 0x282c]
mov edx, 0x3cd
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax]
call dword [ebx + 0x48]
push 0x798950
lea edx, [ebp - 0x2838]
lea eax, [ebp - 0x22c2]
call fcn.0043287c
push dword [ebp - 0x2838]
push 0x798938
push dword [ebp - 0x14]
lea eax, [ebp - 0x2834]
mov edx, 4
call fcn.0040c1b8
mov eax, dword [ebp - 0x2834]
call fcn.00794838
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x68]
cmp byte [ebp + 8], 0
je 0x798602
lea edx, [ebp - 0x2840]
mov eax, dword [ebp - 0x14]
call fcn.004322e0
mov eax, dword [ebp - 0x2840]
lea edx, [ebp - 0x283c]
call fcn.004300b0
mov eax, dword [ebp - 0x283c]
mov edx, 0x7987c8
call fcn.0040c2c8
je 0x798602
lea edx, [ebp - 0x2848]
mov eax, dword [ebp - 0x14]
call fcn.004322e0
mov eax, dword [ebp - 0x2848]
lea edx, [ebp - 0x2844]
call fcn.004300b0
mov eax, dword [ebp - 0x2844]
mov edx, 0x7987e0
call fcn.0040c2c8
je 0x798602
xor eax, eax
mov dword [ebp - 0x2c], eax
xor eax, eax
push ebp
push 0x7985fb
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x284c]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call fcn.0040bbb8
mov eax, dword [ebp - 0x284c]
lea edx, [ebp - 0x2c]
call fcn.007965f8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x798602
lea eax, [ebp - 0x2c]
call fcn.0040b054
pop eax
jmp eax
cmp byte [ebp + 8], 0
je 0x79865e
lea edx, [ebp - 0x2854]
mov eax, dword [ebp - 0x14]
call fcn.004322e0
mov eax, dword [ebp - 0x2854]
lea edx, [ebp - 0x2850]
call fcn.004300b0
mov eax, dword [ebp - 0x2850]
mov edx, 0x7987c8
call fcn.0040c2c8
jne 0x79865e
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
call fcn.00780b68
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1c1], 0
jne 0x79865e
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
call sub.kernel32.dll_DeleteFileW
cmp byte [ebp + 8], 0
je 0x7986bd
lea edx, [ebp - 0x285c]
mov eax, dword [ebp - 0x14]
call fcn.004322e0
mov eax, dword [ebp - 0x285c]
lea edx, [ebp - 0x2858]
call fcn.004300b0
mov eax, dword [ebp - 0x2858]
mov edx, 0x7987e0
call fcn.0040c2c8
jne 0x7986bd
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
call fcn.00794ebc
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x1c1], 0
jne 0x7986bd
mov eax, dword [ebp - 0x14]
call fcn.0040becc
push eax
call sub.kernel32.dll_DeleteFileW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x7987af
lea eax, [ebp - 0x285c]
mov edx, 4
call fcn.0040b0b4
lea eax, [ebp - 0x284c]
call fcn.0040b078
lea eax, [ebp - 0x2848]
mov edx, 8
call fcn.0040b0b4
lea eax, [ebp - 0x2824]
mov edx, 0x11
call fcn.0040b0b4
lea eax, [ebp - 0x27e0]
call fcn.0040b09c
lea eax, [ebp - 0x27dc]
call fcn.0040b078
lea eax, [ebp - 0x27d8]
call fcn.0040b09c
lea eax, [ebp - 0x27d4]
call fcn.0040b078
lea eax, [ebp - 0x27d0]
call fcn.0040b09c
lea eax, [ebp - 0x27cc]
call fcn.0040b078
lea eax, [ebp - 0x27c8]
mov edx, 3
call fcn.0040b0b4
lea eax, [ebp - 0x27bc]
call fcn.0040b078
lea eax, [ebp - 0x27b8]
mov edx, 7
call fcn.0040b0b4
lea eax, [ebp - 0x279c]
call fcn.0040b078
lea eax, [ebp - 0x2798]
mov edx, 2
call fcn.0040b0b4
lea eax, [ebp - 0x20]
mov edx, 8
call fcn.0040b0b4
lea eax, [ebp + 0xc]
call fcn.0040b054
pop eax
jmp eax