Function at 0x1000dcc0
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10012e9b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x588
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
cmp esi, ebx
mov dword [ebp - 0x10], esp
jne 0x1000dd00
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jb 0x1000e414
cmp al, 4
jb 0x1000e414
lea eax, [ebp - 0x490]
push 0x104
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
call esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x1000dd46
lea ecx, [ebp - 0x38c]
push 0x104
push ecx
push eax
call esi
jmp 0x1000dd6e
mov edi, 0x10016a04
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x38c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x288]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [ebp - 0x594]
lea eax, [ebp - 0x288]
push edx
push ebx
push 0x10016a00
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x1000ddaf
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x288]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x289], 0x5c
je 0x1000ddd8
lea edx, [ebp - 0x288]
push 0x1001636c
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x288]
push str.WININIT.INI
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [ebp - 0x288]
mov byte [ebp + 8], 0xd
push ecx
mov byte [ebp + 9], 0xa
mov byte [ebp + 0xa], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1000df32
push str._rename_
lea edx, [ebp - 0x184]
push 0x100169e4
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x288]
mov dword [ebp - 4], ebx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1000de67
lea ecx, [ebp - 0x4c]
push 0x10014260
push ecx
mov dword [ebp - 0x4c], 0x100171bc
call sub.MSVCRT.dll__CxxThrowException
mov eax, 0x1000e429
ret
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edi, [ebp - 0x184]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
push ebx
dec ecx
push edx
lea eax, [ebp - 0x184]
push ecx
mov dword [ebp + 0xc], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push esi
call ebx
lea ecx, [ebp + 0xc]
push 0
push ecx
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [ebp + 8]
push ecx
push edx
push esi
call ebx
lea eax, [ebp - 0x490]
lea ecx, [ebp - 0x38c]
push eax
push ecx
lea edx, [ebp - 0x184]
push str._s_s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp + 0xc]
lea edi, [ebp - 0x184]
or ecx, 0xffffffff
push 0
push eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [ebp - 0x184]
push ecx
push esi
call ebx
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [ebp + 8]
push ecx
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x594]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push 0x80
push 3
push ebx
push ebx
lea edx, [ebp - 0x288]
push SysReAllocStringLen
push edx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 4], 2
call esi
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x48], edi
jne 0x1000df86
lea eax, [ebp - 0x58]
push 0x10014260
push eax
mov dword [ebp - 0x58], 0x100171bc
call sub.MSVCRT.dll__CxxThrowException
push ebx
push 0x80
push 2
push ebx
push ebx
lea ecx, [ebp - 0x594]
push 0x40000000
push ecx
call esi
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x1000dfbb
lea edx, [ebp - 0x60]
push 0x10014260
push edx
mov dword [ebp - 0x60], 0x100171bc
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x34], ebx
push eax
push edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x30], eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp - 0x30]
add esp, 4
lea ecx, [ebp - 0x1c]
mov esi, eax
push ebx
push ecx
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [ebp + 0xf]
mov edi, esi
mov byte [ebp - 0x2c], al
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov cl, byte [ebp + 0xf]
mov dword [ebp - 0x7c], ebx
mov byte [ebp - 0x80], cl
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
repne scasb al, byte es:[edi]
mov eax, dword [edx]
mov edx, dword [ebp - 0x24]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
mov byte [ebp - 4], 4
cmp eax, esi
ja 0x1000e050
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edx, dword [ebp - 0x24]
cmp esi, ebx
jbe 0x1000e092
lea ebx, [edx + esi]
push 0
push ebx
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x1000e08d
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
lea edi, [edx + ecx]
mov ecx, esi
mov eax, ecx
lea esi, [ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x24], ebx
mov byte [ecx + ebx], 0
mov edx, dword [ebp - 0x24]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x30], ebx
jbe 0x1000e2a9
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov dword [ebp - 0x54], edi
jne 0x1000e0bd
cmp esi, edx
ja 0x1000e124
mov dword [ebp - 0x18], esi
jmp 0x1000e12f
cmp esi, edx
jae 0x1000e124
sub edx, esi
mov ebx, edx
cmp edi, ebx
ja 0x1000e122
mov eax, dword [ebp - 0x28]
mov edx, 1
sub edx, edi
add ebx, edx
add eax, esi
mov dword [ebp - 0x18], eax
movsx ecx, byte [ebp + 8]
mov edx, dword [ebp - 0x18]
push ebx
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x1000e122
mov ecx, edi
lea edi, [ebp + 8]
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x1000e10d
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x14]
sub eax, ecx
xor ebx, ebx
mov dword [ebp - 0x18], eax
jmp 0x1000e12f
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x54]
sub ecx, eax
inc eax
lea ebx, [ebx + ecx - 1]
mov dword [ebp - 0x18], eax
jmp 0x1000e0da
xor ebx, ebx
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [edx]
mov dword [ebp - 0x18], eax
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ecx]
je 0x1000e2a9
mov edx, dword [ebp - 0x30]
dec edx
cmp esi, edx
jae 0x1000e2a9
sub eax, esi
lea ecx, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x44]
push esi
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x70]
push ecx
push edx
mov byte [ebp - 4], 5
call fcn.1000d660
mov eax, dword [ebp - 0x6c]
add esp, 8
cmp eax, ebx
je 0x1000e195
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x1000e18c
cmp al, 0xff
je 0x1000e18c
dec al
mov byte [ecx], al
jmp 0x1000e195
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x6c], ebx
cmp eax, ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
jne 0x1000e1aa
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov edx, dword [ebp - 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x1c]
push ebx
push ecx
push edx
push eax
mov eax, dword [ebp + 0xc]
push eax
call esi
lea ecx, [ebp - 0x1c]
push ebx
push ecx
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ebx, dword [ebp + 0xc]
lea edx, [ebp + 8]
not ecx
dec ecx
push ecx
push edx
push ebx
call esi
mov eax, dword [ebp - 0x40]
xor edi, edi
cmp eax, edi
jne 0x1000e1eb
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push str._rename_
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x1000e265
lea eax, [ebp - 0x490]
lea ecx, [ebp - 0x38c]
push eax
push ecx
lea edx, [ebp - 0x184]
push str._s_s
push edx
mov dword [ebp - 0x34], 1
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x1c]
or ecx, 0xffffffff
push edi
push eax
lea edi, [ebp - 0x184]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [ebp - 0x184]
push ecx
push ebx
call esi
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1c]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [ebp + 8]
push ecx
push eax
push ebx
call esi
xor edi, edi
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 4
inc ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x40]
cmp ecx, edi
je 0x1000e293
mov al, byte [ecx - 1]
test al, al
je 0x1000e289
cmp al, 0xff
je 0x1000e289
dec al
mov byte [ecx - 1], al
jmp 0x1000e293
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
xor ebx, ebx
jmp 0x1000e097
cmp dword [ebp - 0x34], ebx
jne 0x1000e379
push str._rename_
lea edx, [ebp - 0x184]
mov dword [ebp - 0x14], ebx
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
push 0x100169e4
push edx
call ebx
add esp, 0xc
lea eax, [ebp - 0x14]
lea edi, [ebp - 0x184]
or ecx, 0xffffffff
push 0
push eax
xor eax, eax
mov edx, dword [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
dec ecx
push ecx
lea ecx, [ebp - 0x184]
push ecx
push edx
call esi
lea eax, [ebp - 0x14]
push 0
push eax
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [ebp + 0xc]
not ecx
dec ecx
push ecx
lea ecx, [ebp + 8]
push ecx
push edx
call esi
lea eax, [ebp - 0x490]
lea ecx, [ebp - 0x38c]
push eax
push ecx
lea edx, [ebp - 0x184]
push str._s_s
push edx
call ebx
add esp, 0x10
lea eax, [ebp - 0x14]
lea edi, [ebp - 0x184]
or ecx, 0xffffffff
push 0
push eax
xor eax, eax
mov ebx, dword [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [ebp - 0x184]
push ecx
push ebx
call esi
lea edi, [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x14]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
lea eax, [ebp + 8]
push ecx
push eax
push ebx
call esi
xor ebx, ebx
mov ecx, dword [ebp - 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [ebp + 0xc]
push edx
call esi
lea eax, [ebp - 0x288]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x288]
lea edx, [ebp - 0x594]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [ebp - 0x7c]
cmp ecx, ebx
je 0x1000e3cf
mov al, byte [ecx - 1]
test al, al
je 0x1000e3c5
cmp al, 0xff
je 0x1000e3c5
dec al
mov byte [ecx - 1], al
jmp 0x1000e3cf
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0x28]
cmp ecx, ebx
je 0x1000df1c
mov al, byte [ecx - 1]
test al, al
je 0x1000e3ef
cmp al, 0xff
je 0x1000e3ef
dec al
mov byte [ecx - 1], al
jmp 0x1000df1c
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x1000df1c
mov eax, dword [ebp + 0xc]
push 5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x1000df1c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret