Function at 0x404760
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x15c
mov eax, dword [0x425024]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
push edi
lea eax, [ebx + 4]
mov dword [ebx + 0x618], 0
push 0x104
push eax
mov dword [ebx + 0x614], 0
mov dword [esp + 0x3c], eax
call esi
push edi
lea eax, [ebx + 0x20c]
push 0x104
push eax
mov dword [esp + 0x4c], eax
call esi
add esp, 0x18
lea ecx, [ebx + 0x20a]
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4047d0
mov eax, dword [0x41d9dc]
lea edx, [ebx + 0x698]
mov dword [ecx], eax
mov eax, dword [0x41d9e0]
mov dword [ecx + 4], eax
mov ax, word [0x41d9e4]
mov word [ecx + 8], ax
mov ecx, dword [ebp + 0xc]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x404800
mov ecx, 0x428f08
lea edx, [ebx + 0x61c]
mov eax, dword [ecx]
lea edx, [edx + 4]
add ecx, 4
mov dword [edx - 4], eax
cmp ecx, 0x428f54
jl 0x404818
lea eax, [ebx + 4]
push 0x41da00
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
push 2
mov edi, eax
push 0
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push edi
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov esi, eax
call edi
add esp, 0x1c
mov dword [ebx + 0x614], esi
mov ecx, ebx
call fcn.00404ff0
cmp eax, 5
jne 0x404aa7
lea eax, [ebx + 4]
push 0x41d9e8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov esi, eax
add esp, 8
mov dword [esp + 0x18], esi
test esi, esi
jne 0x4048a8
lea eax, [esi + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.0041a772
mov esp, ebp
pop ebp
ret 0xc
lea eax, [ebx + 0x20c]
push 0x41d9f0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
add esp, 8
mov dword [esp + 0x1c], eax
push esi
test eax, eax
jne 0x4048e7
call edi
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.0041a772
mov esp, ebp
pop ebp
ret 0xc
push 1
lea eax, [esp + 0x150]
push 0x19
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov eax, dword [ebx + 0x668]
add esp, 0x10
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 0x66c]
lea eax, [eax + ecx*2]
mov ecx, ebx
mov dword [esp + 0x2c], eax
lea eax, [ebx + 0x698]
push eax
call fcn.00405160
lea ecx, [ebx + 0x6b9]
mov edx, ecx
mov dword [esp + 0x28], ecx
sub edx, eax
nop
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x404930
add dword [ebx + 0x614], 0xffffffe7
mov ecx, dword [ebx + 0x6dc]
mov edi, ecx
mov eax, dword [ebx + 0x614]
cdq
idiv ecx
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, edx
mov dword [esp + 0x24], 0
cmp ebx, 1
mov dword [esp + 0xc], ecx
push ecx
lea edx, [eax + 1]
cmovb edx, eax
mov dword [esp + 0x24], edx
call esi
mov ecx, edi
mov dword [esp + 0x14], eax
add ecx, 0x10
push ecx
call esi
add esp, 8
mov dword [esp + 0x14], eax
cmp dword [esp + 0x10], 0
je 0x404a8d
test eax, eax
je 0x404a8d
sub esp, 8
mov dword [esp + 0x40], 1
push dword [esp + 0x30]
push 1
push ecx
lea ecx, [esp + 0x4c]
call fcn.00405ad0
mov eax, dword [esp + 0x20]
mov esi, 1
cmp eax, esi
jl 0x404a35
cmp esi, eax
jne 0x4049da
cmp ebx, 1
jb 0x4049da
mov edi, ebx
mov dword [esp + 0xc], ebx
sub edi, dword [esp + 0x2c]
push dword [esp + 0x18]
push dword [esp + 0x10]
push 1
push dword [esp + 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x48]
add esp, 0x10
shl eax, 3
push dword [esp + 0x14]
push eax
push dword [esp + 0x18]
call fcn.00405ee0
test eax, eax
js 0x404a2d
push dword [esp + 0x1c]
push edi
push 1
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov eax, dword [esp + 0x30]
inc esi
add esp, 0x10
cmp esi, eax
jle 0x4049c9
jmp 0x404a35
mov dword [esp + 0x24], 7
push dword [esp + 0x18]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call esi
push dword [esp + 0x20]
call esi
push dword [esp + 0x18]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push dword [esp + 0x20]
call esi
mov ebx, dword [esp + 0x40]
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
push ebx
push dword [esp + 0x4c]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
mov eax, dword [esp + 0x40]
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.0041a772
mov esp, ebp
pop ebp
ret 0xc
push dword [esp + 0x18]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call esi
push dword [esp + 0x20]
call esi
add esp, 8
mov eax, 8
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041a772
mov esp, ebp
pop ebp
ret 0xc