Function at 0x401150
Capabilities:
Copy file
Delete file
Get common file path
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x10264
call fcn.00401500
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x171]
mov byte [esp + 0x170], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x6d]
mov byte [esp + 0x6c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3fff
xor eax, eax
lea edi, [esp + 0x275]
mov byte [esp + 0x274], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10278]
push 0x104
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x174]
xor esi, esi
push eax
push ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], esi
or ebx, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x4084f0
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push esi
push str.captemp.exe
push 0x4084f0
lea edx, [esp + 0x78]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x170]
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40124f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10264
ret
push esi
push 0x80
push 3
push esi
push esi
lea edx, [esp + 0x80]
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401280
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10264
ret
push 2
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push str._HERO_SFX
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
neg eax
push eax
push edi
call ebp
lea eax, [esp + 0x10]
push 0
push eax
push str._HERO_SFX
call esi
lea ecx, [esp + 0x54]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push str._HERO_SFX
call esi
push eax
lea edx, [esp + 0x50]
push str._HERO_SFX
push edx
call fcn.004014c0
add esp, 0xc
test eax, eax
je 0x4012e2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10264
ret
push str._HERO_SFX
call esi
mov esi, eax
push 2
add esi, 4
push 0
mov eax, esi
neg eax
push eax
push edi
call ebp
lea ecx, [esp + 0x10]
push 0
push ecx
push 4
push 0x4085f4
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x4085f4]
test eax, eax
je 0x401495
mov dword [esp + 0x18], 0
jle 0x40148d
jmp 0x401332
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esi, 0x28
push 2
mov edx, esi
push 0
neg edx
push edx
push edi
call ebp
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x2c]
push 0x28
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, 0x4050d0
mov dword [esp + 0x14], 0
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea edx, [esp + 0x28]
push ebp
push edx
call fcn.004014c0
add esp, 0xc
test eax, eax
je 0x401397
mov eax, dword [esp + 0x14]
add ebp, 0x20
add eax, 0x20
cmp eax, 0xc0
mov dword [esp + 0x14], eax
jb 0x401363
jmp 0x40148d
mov ebp, dword [esp + 0x48]
push 2
add esi, ebp
push 0
mov eax, esi
neg eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x24]
lea edx, [esp + 0x6c]
push ecx
push 0x4084f0
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x6c]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x6c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x82
push 2
push 0
push 0
lea edx, [esp + 0x80]
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401495
mov eax, dword [esp + 0x48]
xor ebp, ebp
test eax, eax
jbe 0x40146c
sub eax, ebp
cmp eax, 0xffff
jbe 0x401428
mov eax, pe_overlay
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x27c]
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40146c
lea ecx, [esp + 0x20]
push 0
push ecx
lea edx, [esp + 0x27c]
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x48]
add ebp, edx
cmp ebp, eax
jb 0x40141a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x4085f4]
or ebx, 0xffffffff
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x40132c
mov dword [esp + 0x1c], 1
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
cmp ebx, 0xffffffff
je 0x4014a6
push ebx
call esi
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10264
ret