Function at 0x403b20
Capabilities:
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x30c
lea eax, [esp + 0x10c]
lea ecx, [esp + 0x20c]
lea edx, [esp + 0xc]
push ebx
push ebp
push esi
push edi
push eax
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push 0x413bf8
call dword [sym.imp.MSVCRT.dll__splitpath]
mov esi, dword [esp + 0x338]
mov ebx, dword [esp + 0x334]
push esi
push ebx
call fcn.00403b00
add esp, 0x1c
test al, al
je 0x403b7d
push 0x4139e4
lea ecx, [esp + 0x20]
push esi
lea edx, [esp + 0x18]
push ecx
push edx
jmp 0x403b91
push str..bin
lea eax, [esp + 0x20]
push str.main
lea ecx, [esp + 0x18]
push eax
push ecx
mov esi, dword [sym.imp.MSVCRT.dll__makepath]
push 0x413af0
call esi
mov eax, ebx
add esp, 0x14
and eax, 0x100
mov dword [esp + 0x18], eax
je 0x403bfc
push 0x4139e8
call fcn.004052a0
add esp, 4
test eax, eax
je 0x403bcc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30c
ret
push 6
push 0x4139e8
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x11c]
lea eax, [esp + 0x21c]
push edx
push eax
push 0x4139e8
push 0
push 0x413af0
call esi
add esp, 0x14
jmp 0x403c03
mov byte [0x4139e8], 0
test bl, 0x40
jne 0x403d78
call fcn.004040b0
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
call fcn.004049f0
mov esi, eax
add esi, 0x10000
sub ebx, esi
mov ebp, ebx
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebx, eax
push 0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, esi
je 0x403c74
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SetFilePointer_for_input.
call fcn.004046c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
lea ecx, [esp + 0x14]
push 0
push ecx
push ebp
push ebx
push edi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403cba
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.ReadFile_for_input.
call fcn.004046c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
mov ecx, dword [esp + 0x18]
mov eax, 0x80
test ecx, ecx
je 0x403ccc
mov eax, 6
push 0
push eax
push 2
push 0
push 1
push 0x40000000
push 0x413af0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403d16
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Cannot_open_output_file.
call fcn.004046c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
lea edx, [esp + 0x14]
push 0
push edx
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403d59
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
push str.WriteFile_for_output_file.
call fcn.004046c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
push str.Copy_succeeded.
call fcn.004046c0
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 8
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
pop edi
pop esi
pop ebp
mov eax, 0x413af0
pop ebx
add esp, 0x30c
ret