Function at 0x406990
Capabilities:
Clear file content
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x11cc
call fcn.00410d70
mov eax, dword [0x4110a4]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x10000
call fcn.004109f0
add esp, 4
mov dword [ebp - 0x119c], eax
cmp dword [ebp - 0x119c], 0
je 0x406ffb
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x119c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x119c]
lea edx, [ecx + eax*2 - 0xc]
mov eax, 2
imul ecx, eax, 0
xor eax, eax
mov word [edx + ecx], ax
push 9
mov ecx, dword [ebp - 0x119c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xorps xmm0, xmm0
movlpd qword [ebp - 0x1198], xmm0
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 0x119c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x118c], eax
mov ecx, dword [ebp - 0x119c]
push ecx
call fcn.004109d0
add esp, 4
cmp dword [ebp - 0x118c], 0xffffffff
je 0x406ffb
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x118c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp dword [ebp - 0x28], 0
jl 0x406fee
jg 0x406a80
cmp dword [ebp - 0x2c], 0x48
jbe 0x406fee
push 0x100000
call fcn.004109f0
add esp, 4
mov dword [ebp - 0x1190], eax
cmp dword [ebp - 0x1190], 0
je 0x406fee
mov ecx, dword [ebp - 0x2c]
sub ecx, 0x48
mov edx, dword [ebp - 0x28]
sbb edx, 0
mov dword [ebp - 0x1198], ecx
mov dword [ebp - 0x1194], edx
push 0
push 0
mov eax, dword [ebp - 0x1194]
push eax
mov ecx, dword [ebp - 0x1198]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x30]
push eax
push 0x48
lea ecx, [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x54], 0x756f6863
jne 0x406fdf
cmp dword [ebp - 0x50], 0x6420676e
jne 0x406fdf
cmp dword [ebp - 0x4c], 0x20676e6f
jne 0x406fdf
cmp dword [ebp - 0x48], 0x6b6f6f6c
jne 0x406fdf
cmp dword [ebp - 0x44], 0x696c2073
jne 0x406fdf
cmp dword [ebp - 0x40], 0x6820656b
jne 0x406fdf
cmp dword [ebp - 0x3c], 0x6420746f
jne 0x406fdf
cmp dword [ebp - 0x38], 0x2121676f
jne 0x406fdf
mov eax, dword [ebp - 0x2c]
sub eax, 0x48
mov ecx, dword [ebp - 0x28]
sbb ecx, 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ecx
lea edx, [ebp - 0x7c]
push edx
push 0x41107c
lea eax, [ebp - 0x24]
push eax
call fcn.00401e90
add esp, 0xc
lea ecx, [ebp - 0xbc]
push ecx
push 0x20
lea edx, [ebp - 0x24]
push edx
call fcn.0040d470
add esp, 0xc
push 0x40
lea eax, [ebp - 0xbc]
push eax
call fcn.0040cda0
add esp, 8
cmp dword [ebp - 0x5c], eax
jne 0x406fcc
push 0
push 0
mov ecx, dword [ebp - 0x1194]
push ecx
mov edx, dword [ebp - 0x1198]
push edx
mov eax, dword [ebp - 0x118c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [ebp - 0x118c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0x100
push 0x100
lea edx, [ebp - 0xbc]
push edx
lea eax, [ebp - 0x1188]
push eax
call fcn.0040c680
add esp, 0x10
lea ecx, [ebp - 0x9c]
push ecx
lea edx, [ebp - 0x1188]
push edx
call fcn.0040c710
add esp, 8
xorps xmm0, xmm0
movlpd qword [ebp - 0x1198], xmm0
push 0
push 0
mov eax, dword [ebp - 0x1194]
push eax
mov ecx, dword [ebp - 0x1198]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
cmp dword [ebp - 0x28], 0
jl 0x406d8e
jg 0x406c53
cmp dword [ebp - 0x2c], 0x1400000
jbe 0x406d8e
push 0
push 0xa00000
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00410cc0
mov dword [ebp - 0x11bc], eax
mov dword [ebp - 0x11b8], edx
xorps xmm0, xmm0
movlpd qword [ebp - 0x11a4], xmm0
jmp 0x406c9e
mov edx, dword [ebp - 0x11a4]
add edx, 1
mov eax, dword [ebp - 0x11a0]
adc eax, 0
mov dword [ebp - 0x11a4], edx
mov dword [ebp - 0x11a0], eax
mov ecx, dword [ebp - 0x11a0]
cmp ecx, dword [ebp - 0x11b8]
jg 0x406d89
jl 0x406cc4
mov edx, dword [ebp - 0x11a4]
cmp edx, dword [ebp - 0x11bc]
jae 0x406d89
push 0
lea eax, [ebp - 0x30]
push eax
push 0x100000
mov ecx, dword [ebp - 0x1190]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x1190]
push ecx
mov edx, dword [ebp - 0x1190]
push edx
lea eax, [ebp - 0x1188]
push eax
push 0
call fcn.0040ca70
add esp, 0x14
push 0
push 0
mov ecx, dword [ebp - 0x1194]
push ecx
mov edx, dword [ebp - 0x1198]
push edx
mov eax, dword [ebp - 0x118c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea ecx, [ebp - 0x34]
push ecx
push 0x100000
mov edx, dword [ebp - 0x1190]
push edx
mov eax, dword [ebp - 0x118c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x1198]
add ecx, 0xa00000
mov edx, dword [ebp - 0x1194]
adc edx, 0
mov dword [ebp - 0x1198], ecx
mov dword [ebp - 0x1194], edx
push 0
push 0
mov eax, dword [ebp - 0x1194]
push eax
mov ecx, dword [ebp - 0x1198]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x406c80
jmp 0x406fc5
cmp dword [ebp - 0x28], 0
jl 0x406ed7
jg 0x406da7
cmp dword [ebp - 0x2c], 0x500000
jbe 0x406ed7
push 0
push 3
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00410cc0
mov dword [ebp - 0x11c4], eax
mov dword [ebp - 0x11c0], edx
xorps xmm0, xmm0
movlpd qword [ebp - 0x11ac], xmm0
jmp 0x406def
mov edx, dword [ebp - 0x11ac]
add edx, 1
mov eax, dword [ebp - 0x11a8]
adc eax, 0
mov dword [ebp - 0x11ac], edx
mov dword [ebp - 0x11a8], eax
cmp dword [ebp - 0x11a8], 0
jg 0x406ed2
jl 0x406e0b
cmp dword [ebp - 0x11ac], 3
jae 0x406ed2
push 0
lea ecx, [ebp - 0x30]
push ecx
push 0x100000
mov edx, dword [ebp - 0x1190]
push edx
mov eax, dword [ebp - 0x118c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x1190]
push edx
mov eax, dword [ebp - 0x1190]
push eax
lea ecx, [ebp - 0x1188]
push ecx
push 0
call fcn.0040ca70
add esp, 0x14
push 0
push 0
mov edx, dword [ebp - 0x1194]
push edx
mov eax, dword [ebp - 0x1198]
push eax
mov ecx, dword [ebp - 0x118c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x1190]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x1198]
add eax, dword [ebp - 0x11c4]
mov ecx, dword [ebp - 0x1194]
adc ecx, dword [ebp - 0x11c0]
mov dword [ebp - 0x1198], eax
mov dword [ebp - 0x1194], ecx
push 0
push 0
mov edx, dword [ebp - 0x1194]
push edx
mov eax, dword [ebp - 0x1198]
push eax
mov ecx, dword [ebp - 0x118c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x406dd1
jmp 0x406fc5
cmp dword [ebp - 0x28], 0
jl 0x406fc5
jg 0x406eed
cmp dword [ebp - 0x2c], 0
jbe 0x406fc5
cmp dword [ebp - 0x28], 0
jl 0x406f1a
jg 0x406efb
cmp dword [ebp - 0x2c], 0x40
jbe 0x406f1a
push 0
push 0xa
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00410cc0
mov dword [ebp - 0x11b4], eax
mov dword [ebp - 0x11b0], edx
jmp 0x406f2c
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x11b4], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x11b0], edx
mov eax, dword [ebp - 0x11b4]
mov dword [ebp - 0x11cc], eax
mov ecx, dword [ebp - 0x11b0]
mov dword [ebp - 0x11c8], ecx
push 0
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x11cc]
push eax
mov ecx, dword [ebp - 0x1190]
push ecx
mov edx, dword [ebp - 0x118c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x1190]
push ecx
mov edx, dword [ebp - 0x1190]
push edx
lea eax, [ebp - 0x1188]
push eax
push 0
call fcn.0040ca70
add esp, 0x14
push 0
push 0
mov ecx, dword [ebp - 0x1194]
push ecx
mov edx, dword [ebp - 0x1198]
push edx
mov eax, dword [ebp - 0x118c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x1190]
push eax
mov ecx, dword [ebp - 0x118c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x406a59
push 0
push 0x4012d4
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [ebp - 0x1190]
push eax
call fcn.004109d0
add esp, 4
mov ecx, dword [ebp - 0x118c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410bf7
mov esp, ebp
pop ebp
ret