Function at 0x403f40
Capabilities:
Create directory
Delete file
Enumerate files on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c358
push 0x4056a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, 0x3a80
call fcn.00405280
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x3a98], esi
xor ebx, ebx
mov dword [ebp - 0x201c], ebx
mov dword [ebp - 4], ebx
lea eax, [esi + 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4044fe
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x4044fe
mov ecx, esi
call fcn.00404560
lea ecx, [ebp - 0x3830]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov word [ebp - 0x3828], bx
mov word [ebp - 0x3826], bx
mov word [ebp - 0x3824], bx
mov word [ebp - 0x3822], bx
lea edx, [ebp - 0x3838]
push edx
lea eax, [ebp - 0x3830]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x4044f0
lea edi, [esi + 0x814]
push edi
lea ecx, [ebp - 0x3838]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x4044f0
mov edx, dword [edi]
add edx, 0x2a69c000
mov eax, dword [edi + 4]
adc eax, 0xc9
mov dword [esi + 0x81c], edx
mov dword [esi + 0x820], eax
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x4040a8
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40405c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40405c
push 0xa3
mov ecx, dword [str.Open__]
push ecx
jmp 0x404511
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [edi + eax*2 - 2], 0x5c
lea edi, [esi + 4]
jne 0x40408b
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str._s_s
push 0x3ff
push edi
call fcn.004051ce
add esp, 0x14
jmp 0x4040c2
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0x40efe8
push 0x3ff
push edi
call fcn.004051ce
add esp, 0x14
jmp 0x4040c2
lea edi, [esi + 4]
mov eax, dword [ebp + 8]
push eax
push 0x40f774
push 0x3ff
push edi
call fcn.004051ce
add esp, 0x10
mov word [ebp - 0x3022], bx
mov word [ebp - 0x3820], bx
lea eax, [esi + 0x840]
push eax
mov ecx, dword [ebp - 0x382a]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x382e]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x3830]
and eax, 0xffff
push eax
push edi
push str._s__04d_02d_02d._s
push 0x3ff
lea ecx, [ebp - 0x3820]
push ecx
call fcn.004051ce
add esp, 0x20
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
lea edx, [ebp - 0x3820]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x804], eax
cmp eax, 0xffffffff
jne 0x404149
push 0xbc
jmp 0x40450b
lea eax, [esi + 0x840]
push eax
push edi
push str._s_._s
push 0x3ff
lea ecx, [ebp - 0x3820]
push ecx
call fcn.004051ce
add esp, 0x14
lea edx, [ebp - 0x3a88]
push edx
lea eax, [ebp - 0x3820]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x3020], eax
cmp eax, 0xffffffff
jne 0x40419a
push 0xc5
mov ecx, dword [str.Open__]
push ecx
jmp 0x404511
lea edx, [ebp - 0x3a94]
push edx
lea eax, [ebp - 0x3a5c]
push eax
call fcn.00404cc0
add esp, 8
mov ecx, dword [esi + 0x810]
inc ecx
push 0xc9
push 0x2a69c000
push ebx
push ecx
call fcn.00405780
mov edi, dword [esi + 0x814]
sub edi, dword [ebp - 0x3a94]
mov ecx, dword [esi + 0x818]
sbb ecx, dword [ebp - 0x3a90]
cmp ecx, edx
jb 0x404287
ja 0x4041f2
cmp edi, eax
jb 0x404287
lea edx, [ebp - 0x3838]
push edx
lea eax, [ebp - 0x3a94]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x404287
lea ecx, [ebp - 0x3830]
push ecx
lea edx, [ebp - 0x3838]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x404287
mov word [ebp - 0x3022], bx
mov word [ebp - 0x3820], bx
lea eax, [esi + 0x840]
push eax
mov ecx, dword [ebp - 0x382a]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x382e]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x3830]
and eax, 0xffff
push eax
lea ecx, [esi + 4]
push ecx
push str._s__04d_02d_02d._s
push 0x3ff
lea edx, [ebp - 0x3820]
push edx
call fcn.004051ce
add esp, 0x20
lea eax, [ebp - 0x3820]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x3a88]
push ecx
mov edx, dword [ebp - 0x3020]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, 1
je 0x40419a
mov eax, dword [ebp - 0x3020]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 2
push ebx
push ebx
mov ecx, dword [esi + 0x804]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4042d8
push 0xdc
mov edx, dword [str.Open__]
push edx
jmp 0x404511
mov word [ebp - 0x1a], bx
mov word [ebp - 0x2018], bx
lea eax, [ebp - 0x3830]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, dword [str._r_n]
push ecx
push 0x40f774
push 0xfff
lea edx, [ebp - 0x2018]
push edx
call fcn.004051ce
add esp, 0x10
mov dword [ebp - 0x3a8c], eax
push ebx
push ebx
push 0xfff
lea eax, [ebp - 0x301c]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x2018]
push ecx
push 0x200
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call edi
dec eax
mov dword [ebp - 0x3a8c], eax
mov byte [ebp - 0x201d], bl
push ebx
lea edx, [ebp - 0x3a8c]
push edx
push eax
lea eax, [ebp - 0x301c]
push eax
mov ecx, dword [esi + 0x804]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40437a
push 0xec
mov edx, dword [str.Open__]
push edx
jmp 0x404511
mov eax, dword [str.AgentFileLog]
push eax
mov ecx, dword [ebp - 0x3822]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x3824]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x3826]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x3828]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x382a]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x382e]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x3830]
and ecx, 0xffff
push ecx
push str._04d__02d__02d__02d:_02d:_02d._03d:__s
push 0xfff
lea edx, [ebp - 0x2018]
push edx
call fcn.004051ce
add esp, 0x2c
mov dword [ebp - 0x3a8c], eax
push ebx
push ebx
push 0xfff
lea eax, [ebp - 0x301c]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x2018]
push ecx
push 0x200
push ebx
call edi
dec eax
mov dword [ebp - 0x3a8c], eax
mov byte [ebp - 0x201d], bl
push ebx
lea edx, [ebp - 0x3a8c]
push edx
push eax
lea eax, [ebp - 0x301c]
push eax
mov ecx, dword [esi + 0x804]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404456
push 0xf9
mov edx, dword [str.Open__]
push edx
jmp 0x404511
mov eax, dword [str._r_n]
push eax
push 0x40f774
push 0xfff
lea ecx, [ebp - 0x2018]
push ecx
call fcn.004051ce
add esp, 0x10
mov dword [ebp - 0x3a8c], eax
push ebx
push ebx
push 0xfff
lea edx, [ebp - 0x301c]
push edx
push 0xffffffffffffffff
lea eax, [ebp - 0x2018]
push eax
push 0x200
push ebx
call edi
dec eax
mov dword [ebp - 0x3a8c], eax
mov byte [ebp - 0x201d], bl
push ebx
lea ecx, [ebp - 0x3a8c]
push ecx
push eax
lea edx, [ebp - 0x301c]
push edx
mov eax, dword [esi + 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4044d6
push 0x105
mov ecx, dword [str.Open__]
push ecx
jmp 0x404511
mov byte [esi + 0x808], 1
mov dword [ebp - 0x201c], 1
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x404518
push 0x99
mov edx, dword [str.Open__]
push edx
jmp 0x404511
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x8a
mov eax, dword [str.Open__]
push eax
mov ecx, esi
call fcn.00404bc0
mov dword [ebp - 4], 0xffffffff
call fcn.00404543
mov eax, dword [ebp - 0x201c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8