Function at 0x406980
Capabilities:
Delete directory
Enumerate files on windows
Get file size
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1298
call fcn.004a5d20
mov eax, dword [0x4c4004]
xor eax, esp
mov dword [esp + 0x1294], eax
push ebx
push ebp
push esi
mov esi, dword [sym.imp.kernel32.dll_CreateFileW]
xor eax, eax
push edi
push eax
push 0x80
push 3
push eax
push eax
push 0x80000000
push edx
mov ebp, ecx
mov dword [esp + 0x4c], eax
call esi
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x4069f9
push 0x30
push 0x4adab8
push 0x4ada68
push dword [0x4def88]
call dword [sym.imp.user32.dll_MessageBoxW]
or eax, 0xffffffff
mov ecx, dword [esp + 0x12a4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0048d815
add esp, 0x1298
ret
push 0
push eax
call dword [sym.imp.kernel32.dll_GetFileSize]
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, 0xffffffff
je 0x4069dd
mov edi, dword [sym.imp.kernel32.dll_HeapCreate]
push 0
push 0
push 0
call edi
lea ecx, [ebx + 2]
mov dword [esp + 0x40], eax
mov ebx, dword [sym.imp.kernel32.dll_HeapAlloc]
push ecx
push 8
push eax
call ebx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4069dd
push 0
lea ecx, [esp + 0x48]
mov dword [esp + 0x48], 0
push ecx
push dword [esp + 0x1c]
push eax
push dword [esp + 0x38]
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x4069dd
mov ecx, dword [esp + 0x14]
mov eax, 0
shr ecx, 1
mov dword [esp + 0x14], ecx
je 0x406a88
mov edx, dword [esp + 0x2c]
nop dword [eax]
cmp word [edx + eax*2], 0xd
jne 0x406a7d
xor edi, edi
mov word [edx + eax*2], di
inc eax
cmp eax, ecx
jb 0x406a70
mov edi, dword [sym.imp.kernel32.dll_HeapCreate]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push 0x4cc5d0
call esi
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
je 0x4069dd
xor eax, eax
push 0x7fe
push eax
mov word [esp + 0xaa8], ax
lea eax, [esp + 0xaaa]
push eax
call fcn.0048e770
add esp, 0xc
xor eax, eax
mov word [esp + 0x2a0], ax
push 0x7fe
push eax
lea eax, [esp + 0x2aa]
push eax
call fcn.0048e770
add esp, 0xc
mov dword [esp + 0x18], 0
push ebp
call dword [sym.imp.kernel32.dll_lstrlenW]
xor esi, esi
mov dword [esp + 0x1c], 1
push esi
push esi
inc eax
mov dword [esp + 0x3c], 0x1312d00
push esi
mov dword [esp + 0x44], eax
call edi
push 0x1312d00
push 8
push eax
mov dword [esp + 0x30], eax
call ebx
mov edi, eax
mov dword [esp + 0x10], edi
test edi, edi
je 0x4069dd
push ebp
push edi
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
mov ebp, dword [sym.imp.SHLWAPI.dll_StrCmpIW]
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
nop dword [eax]
mov eax, dword [esp + 0x18]
inc esi
mov dword [esp + 0x4c], esi
lea esi, [edi + eax*2]
push esi
lea eax, [esp + 0xaa4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push esi
lea eax, [esp + 0x2a4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
lea eax, [esp + 0x2a0]
push eax
call dword [sym.imp.kernel32.dll_lstrlenW]
mov ecx, dword [esp + 0x18]
inc ecx
add ecx, eax
lea eax, [esp + 0x2a0]
push 0x4ad2c8
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.SHLWAPI.dll_StrCatW]
lea eax, [esp + 0x50]
mov esi, 1
push eax
lea eax, [esp + 0x2a4]
push eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [esp + 0x3c], eax
cmp eax, 0xffffffff
je 0x406e06
nop dword [eax + eax]
test esi, esi
je 0x406e02
push 0x4ad2d0
lea eax, [esp + 0x80]
push eax
call ebp
test eax, eax
je 0x406dec
push 0x4ad2d4
lea eax, [esp + 0x80]
push eax
call ebp
test eax, eax
je 0x406dec
push 0x4ad2dc
lea eax, [esp + 0x80]
push eax
call ebp
test eax, eax
je 0x406dec
push 0x4ad2e4
lea eax, [esp + 0x80]
push eax
call ebp
test eax, eax
je 0x406dec
push 0x4ad2f4
lea eax, [esp + 0x80]
push eax
call ebx
test eax, eax
jne 0x406dec
cmp dword [0x4c4974], eax
je 0x406e5b
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0xaa4]
push eax
push 0x4ad304
lea eax, [esp + 0x2ac]
push 0x400
push eax
call fcn.0040a370
add esp, 0x14
cmp eax, 0xffffffff
je 0x406d6f
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x14]
cmp ebx, edi
jbe 0x406cdf
mov eax, dword [esp + 0x2c]
lea esi, [eax + edi*2]
push esi
lea eax, [esp + 0x2a4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpW]
lea edx, [esi + 2]
nop dword [eax]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x406cb0
sub esi, edx
sar esi, 1
test eax, eax
je 0x406cce
add edi, 2
add edi, esi
cmp ebx, edi
ja 0x406c93
jmp 0x406cdf
lea eax, [edi + 2]
add eax, esi
mov dword [esp + 0x30], eax
cmp ebx, edi
ja 0x406d65
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
lea eax, [esp + 0x2a0]
push 0x4adac8
push eax
call ebx
test eax, eax
jne 0x406d6b
push 0x4adadc
lea eax, [esp + 0x2a4]
push eax
call ebx
test eax, eax
jne 0x406d6b
push 0x4adaf4
lea eax, [esp + 0x2a4]
push eax
call ebx
mov esi, dword [sym.imp.kernel32.dll_lstrlenW]
test eax, eax
jne 0x406d5f
push eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x2a8]
push eax
call esi
mov edi, dword [esp + 0x28]
add eax, eax
push eax
lea eax, [esp + 0x2ac]
push eax
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
push 0
lea eax, [esp + 0x4c]
push eax
push 4
push 0x4ad24c
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
mov edi, dword [esp + 0x10]
jmp 0x406d75
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov edi, dword [esp + 0x10]
mov esi, dword [sym.imp.kernel32.dll_lstrlenW]
test byte [esp + 0x50], 0x10
je 0x406dec
lea eax, [esp + 0x2a0]
push eax
call esi
mov esi, dword [esp + 0x38]
add eax, esi
mov ecx, dword [esp + 0x34]
lea eax, [eax*2 + 2]
cmp eax, ecx
jb 0x406dc1
add ecx, 0x1312d00
push ecx
push edi
push 8
push dword [esp + 0x30]
mov dword [esp + 0x44], ecx
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov edi, eax
mov dword [esp + 0x10], edi
test edi, edi
je 0x406e4a
inc dword [esp + 0x1c]
lea eax, [esp + 0x2a0]
push eax
lea eax, [edi + esi*2]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
lea eax, [esp + 0x2a0]
push eax
call dword [sym.imp.kernel32.dll_lstrlenW]
inc esi
add esi, eax
mov dword [esp + 0x38], esi
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x40]
call dword [sym.imp.kernel32.dll_FindNextFileW]
mov esi, eax
jmp 0x406bd0
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.kernel32.dll_FindClose]
mov esi, dword [esp + 0x4c]
cmp esi, dword [esp + 0x1c]
jne 0x406b50
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call edi
push dword [esp + 0x24]
mov esi, dword [sym.imp.kernel32.dll_HeapDestroy]
call esi
push dword [esp + 0x28]
call edi
push dword [esp + 0x40]
call esi
mov eax, 1
jmp 0x4069e0
push 0x10
push 0x4ad310
push 0x4ad20c
jmp 0x4069d1
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call edi
push dword [esp + 0x24]
mov esi, dword [sym.imp.kernel32.dll_HeapDestroy]
call esi
push dword [esp + 0x28]
call edi
push dword [esp + 0x40]
call esi
mov edi, dword [sym.imp.user32.dll_GetDlgItem]
push 0
push 0
push 0x130b
push 0x271c
push dword [0x4def88]
call edi
mov ebx, dword [sym.imp.user32.dll_SendMessageW]
push eax
call ebx
test eax, eax
jne 0x406ee5
cmp dword [0x4deb74], 1
jne 0x406ee5
push eax
push 0x2980
push dword [0x4def88]
call edi
mov esi, dword [sym.imp.user32.dll_ShowWindow]
push eax
call esi
mov ecx, 1
call fcn.00402c50
push 5
push 0x272e
push dword [0x4def88]
call edi
push eax
call esi
mov ecx, 0x4ccdd0
call fcn.004028a0
push 0x4ccdd0
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
mov edx, 0x4ada1c
mov ecx, 0x4ad090
call fcn.004773a0
push eax
push 0x2728
push dword [0x4def88]
call edi
mov esi, dword [sym.imp.user32.dll_SetWindowTextW]
push eax
call esi
push 0x4ad29c
push 0x2729
push dword [0x4def88]
call edi
push eax
call esi
push 0
push 0
push 0x402
push 0x272b
push dword [0x4def88]
call edi
push eax
call ebx
push 1
mov dword [0x4c4974], 2
call dword [sym.imp.kernel32.dll_ExitThread]