Function at 0x40e4bb
Capabilities:
Check if file exists
Copy file
Create directory
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x20
and dword [esp + 0x10], 0
and dword [esp + 4], 0
push ebx
push 0x4000
call fcn.0046e0d4
mov ebx, eax
pop ecx
mov dword [esp + 4], ebx
test ebx, ebx
je 0x40e74c
push ebp
push esi
lea esi, [ebx + 0x400]
lea ebp, [esi + 0x400]
lea eax, [ebp + 0x800]
push esi
mov dword [esp + 0x24], eax
call fcn.00403c0e
mov dword [esp], 0x4868e8
push esi
push str._s_s
push ebx
call fcn.0046ec88
mov eax, dword [0x49c460]
add esp, 0x10
cmp eax, dword [0x49caf4]
jne 0x40e53b
push ebx
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x1c], 1
jmp 0x40e732
push esi
call fcn.0040d552
pop ecx
mov dword [esp + 0x24], eax
call fcn.0040d5d4
test eax, eax
jne 0x40e557
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push edi
mov ebx, str.K7AVSIGN.INF
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, 0x4946f4
push edi
push ebp
call esi
push 0x4868d4
push ebp
call fcn.004703be
add esp, 0x18
mov dword [esp + 0x14], eax
test eax, eax
je 0x40e72d
push ebx
push dword [esp + 0x14]
lea ebx, [ebp + 0x400]
push edi
push ebx
call esi
add esp, 0x10
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x40e72d
mov ebx, str._Please_do_not_edit_this_manually_r_n
jmp 0x40e6cf
push dword [esp + 0x14]
mov ebx, dword [esp + 0x28]
add ebx, 0x400
push 0x400
push ebx
mov byte [ebx], 0
call fcn.004701b2
push 0xd
push ebx
call fcn.0046fa00
add esp, 0x14
test eax, eax
je 0x40e5f7
mov byte [eax], 0
push 0xa
push ebx
call fcn.0046fa00
pop ecx
pop ecx
test eax, eax
je 0x40e608
mov byte [eax], 0
push 0x3d
push ebx
call fcn.0046fa00
pop ecx
pop ecx
test eax, eax
je 0x40e6f1
push 9
lea ebx, [eax + 1]
push str.K7AVSetGS
push ebx
mov dword [esp + 0x38], ebx
call fcn.0047220e
add esp, 0xc
test eax, eax
je 0x40e670
push 8
push str.K7AVSetZ
push ebx
call fcn.0047220e
add esp, 0xc
test eax, eax
jne 0x40e658
movsx eax, byte [ebx + 8]
push eax
call fcn.0047007f
pop ecx
test eax, eax
jne 0x40e670
push 0xc
push str.K7AVMasterEx
push ebx
call fcn.0047220e
add esp, 0xc
test eax, eax
jne 0x40e6f1
mov eax, dword [esp + 0x10]
push ebx
add eax, 0x400
push eax
push edi
push ebp
call esi
push ebx
push dword [esp + 0x24]
lea ebx, [ebp + 0x400]
push edi
push ebx
call esi
add esp, 0x20
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40e6f1
xor eax, eax
push eax
cmp dword [esp + 0x2c], eax
je 0x40e6b0
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CreateHardLinkA]
jmp 0x40e6b8
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40e723
push dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
push str.Dat_s_r_n
push ebx
call esi
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [esp + 0x1c]
push ecx
push eax
push ebx
push dword [esp + 0x2c]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e723
push dword [esp + 0x14]
call fcn.0046fffa
pop ecx
test eax, eax
je 0x40e5c9
push dword [esp + 0x10]
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x49c460]
mov dword [0x49caf4], eax
mov dword [esp + 0x20], 1
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x10]
pop edi
push ebx
call fcn.0046c1c7
cmp dword [esp + 0x14], 0
pop ecx
pop esi
pop ebp
je 0x40e74c
push dword [esp + 8]
call fcn.0046ff7e
pop ecx
mov eax, dword [esp + 0x14]
pop ebx
add esp, 0x20
ret