Function at 0x403780
Capabilities:
Delete file
Get file size
Move file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x4899f8]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x118], 0
push 0x104
push 0
lea eax, [ebp - 0x117]
push eax
call fcn.004472f0
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x4037c0
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
test edx, edx
jne 0x4037f8
push 0x105
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x4756c0
push 0x105
lea ecx, [ebp - 0x118]
push ecx
call fcn.004031d0
lea edx, [ebp - 0x118]
mov dword [ebp + 0xc], edx
jmp 0x403885
push 0x5c
mov eax, dword [ebp + 0xc]
push eax
call fcn.004486e0
add esp, 8
test eax, eax
jne 0x403885
push 0x105
lea ecx, [ebp - 0x118]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
lea edx, [ebp - 0x118]
push edx
call fcn.00448407
add esp, 8
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x403848
mov eax, dword [ebp - 0x120]
mov byte [eax + 1], 0
mov ecx, 0x105
cmp ecx, 0x7fffffff
jbe 0x403861
mov dword [ebp - 0x240], 0x80070057
jmp 0x40387c
mov edx, dword [ebp + 0xc]
push edx
push 0x105
lea eax, [ebp - 0x118]
push eax
call fcn.00403210
mov dword [ebp - 0x240], eax
lea ecx, [ebp - 0x118]
mov dword [ebp + 0xc], ecx
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x4038b2
jmp 0x403a15
push 0
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
shl ecx, 0xa
cmp dword [ebp - 8], ecx
jbe 0x4039ca
cmp dword [ebp - 8], 0xffffffff
je 0x4039ca
mov edx, dword [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x230], 0
push 0x104
push 0
lea eax, [ebp - 0x22f]
push eax
call fcn.004472f0
add esp, 0xc
push 0x105
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x2e
lea eax, [ebp - 0x230]
push eax
call fcn.00448407
add esp, 8
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
je 0x403946
mov ecx, dword [ebp - 0x124]
mov byte [ecx], 0
mov edx, 0x105
cmp edx, 0x7fffffff
jbe 0x40395f
mov dword [ebp - 0x26c], 0x80070057
jmp 0x40397b
push str.2.log
push 0x105
lea eax, [ebp - 0x230]
push eax
call fcn.00403210
mov dword [ebp - 0x26c], eax
push 0x80
lea ecx, [ebp - 0x230]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x230]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x11c], eax
push 2
push 0
push 0
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 4], 0
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004482c0
add esp, 4
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004472d8
mov esp, ebp
pop ebp
ret