Function at 0x40ab0c
Capabilities:
Create directory
Delete file
Get file size
Move file
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x198]
sub esp, 0x218
mov eax, dword [0x41228c]
xor eax, ebp
mov dword [ebp + 0x194], eax
mov eax, dword [ebp + 0x1a4]
push ebx
push esi
push edi
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x1a8]
mov esi, 0x103
xor ebx, ebx
push esi
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0x91]
push ebx
push eax
mov byte [ebp + 0x90], bl
call sub.MSVCR100.dll_memset
push esi
lea eax, [ebp - 0x73]
push ebx
push eax
mov byte [ebp - 0x74], bl
call sub.MSVCR100.dll_memset
mov ecx, dword [ebp + 0x1a0]
lea eax, [ebp + 0x90]
add esp, 0x18
sub eax, ecx
mov dl, byte [ecx]
mov byte [eax + ecx], dl
inc ecx
cmp dl, bl
jne 0x40ab76
lea edi, [ebp + 0x90]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x40ab87
mov eax, dword [ebp - 0x78]
mov esi, 0x40f478
movsw word es:[edi], word [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ab9b
lea edi, [ebp + 0x90]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x40abab
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x74]
sub eax, ecx
mov dl, byte [ecx]
mov byte [eax + ecx], dl
inc ecx
cmp dl, bl
jne 0x40abcb
lea edi, [ebp - 0x74]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x40abd9
push dword [ebp - 0x78]
mov esi, 0x40f47c
movsw word es:[edi], word [esi]
call fcn.004097f6
mov esi, eax
pop ecx
cmp esi, ebx
jne 0x40abff
push 3
pop eax
jmp 0x40aed1
cmp byte [esi], bl
je 0x40ae76
cmp byte [ebp + 0x1ac], bl
jne 0x40ac26
lea eax, [ebp + 0x90]
push eax
push str.SecurelyCopyPath_expected_dir_for__s_n
call fcn.0040a0af
pop ecx
pop ecx
push 0xf
jmp 0x40abf9
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp + 0x90]
push eax
call fcn.0040aacd
pop ecx
pop ecx
test al, al
jne 0x40ac40
push 4
jmp 0x40abf9
lea eax, [ebp + 0x90]
push str._receipts
push eax
call fcn.0040a0af
pop ecx
pop ecx
test al, al
je 0x40ad87
push ebx
push dword [ebp - 0x78]
call dword [sym.imp.kernel32.dll_GetFileSize]
mov edi, eax
push edi
call fcn.00409308
pop ecx
test al, al
jne 0x40ac90
push str.SecurelyCopyPath_receipts_file_size_not_valid_n
call fcn.0040a0af
pop ecx
push 0x13
pop esi
push dword [ebp - 0x78]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, esi
jmp 0x40aed1
lea eax, [edi + 1]
push eax
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
pop ecx
cmp esi, ebx
jne 0x40acb0
push str.SecurelyCopyPath_could_not_allocate_receipts_file_buffer_n
call fcn.0040a0af
pop ecx
push 0x14
jmp 0x40ac7f
push ebx
lea eax, [ebp - 0x80]
push eax
push edi
push esi
push dword [ebp - 0x78]
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x40acdb
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.SecurelyCopyPath_receipts_ReadFile_error:__d_n
call fcn.0040a0af
pop ecx
pop ecx
push 0x15
jmp 0x40ac7f
mov eax, dword [ebp - 0x80]
cmp eax, edi
je 0x40acf1
push str.SecurelyCopyPath_receipts_read_count_size_mismatch_n
call fcn.0040a0af
pop ecx
push 0x16
jmp 0x40ac7f
mov edi, dword [sym.imp.MSVCR100.dll_strtok]
push 0x40f584
mov byte [eax + esi], bl
push esi
jmp 0x40ad3a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ad07
sub eax, edx
cmp byte [eax + esi - 1], 0xd
jne 0x40ad29
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ad1c
sub eax, edx
mov byte [eax + esi - 1], bl
push esi
call fcn.00409845
pop ecx
test eax, eax
je 0x40ad73
push 0x40f5bc
push ebx
call edi
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
jne 0x40ad02
push ebx
push ebx
push ebx
push dword [ebp - 0x78]
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40add9
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.SecureCopyPath_SetFilePointer_error:___d_n
call fcn.0040a0af
pop ecx
pop ecx
push 9
jmp 0x40ac7f
push esi
push str.SecurelyCopyPath_receipts_file_unknown_bundle:__s_n
call fcn.0040a0af
pop ecx
pop ecx
push 0x17
jmp 0x40ac7f
lea eax, [ebp + 0x90]
push str._finished
push eax
call fcn.0040a0af
pop ecx
pop ecx
test al, al
je 0x40adbe
push ebx
push dword [ebp - 0x78]
call dword [sym.imp.kernel32.dll_GetFileSize]
test eax, eax
je 0x40ad44
push str.SecurelyCopyPath_finished_file_nonzero_size_n
call fcn.0040a0af
pop ecx
push 0x12
jmp 0x40ac7f
inc esi
push esi
push dword [ebp - 0x78]
call fcn.0040a714
pop ecx
pop ecx
cmp eax, ebx
je 0x40ad44
mov esi, eax
jmp 0x40ac80
mov ecx, dword [ebp - 0x78]
lea edx, [ebp - 0x74]
call fcn.0040a98c
test al, al
jne 0x40adef
push 0xd
jmp 0x40ac7f
push dword [ebp - 0x78]
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
jne 0x40ae16
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.SecureCopyPath_CloseHandle_error:___d_n
call fcn.0040a0af
pop ecx
pop ecx
push 0xa
jmp 0x40abf9
lea eax, [ebp + 0x90]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
test eax, eax
jne 0x40ae44
lea eax, [ebp + 0x90]
push eax
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.SecureCopyPath_DeleteFile_error:___d_for_path__s_n
call fcn.0040a0af
add esp, 0xc
jmp 0x40ae0f
push 3
push dword [ebp - 0x7c]
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.kernel32.dll_MoveFileExA]
test eax, eax
jne 0x40aecf
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.SecureCopyPath_MoveFileEx_error:___d_for_path__s_n
call fcn.0040a0af
add esp, 0xc
push 0xb
jmp 0x40abf9
cmp byte [ebp + 0x1ac], bl
je 0x40ae98
lea eax, [ebp + 0x90]
push eax
push str.SecurelyCopyPath_expected_file_for_path__s_n
call fcn.0040a0af
pop ecx
pop ecx
push 0x11
jmp 0x40abf9
push ebx
push dword [ebp - 0x7c]
call dword [sym.imp.kernel32.dll_CreateDirectoryA]
test eax, eax
jne 0x40aecf
mov esi, dword [sym.imp.kernel32.dll_GetLastError]
call esi
cmp eax, 0xb7
je 0x40aecf
push dword [ebp - 0x7c]
call esi
push eax
push str.SecurelyCopyPath_CreateDirectory_error__d_for_path__s_n
call fcn.0040a0af
add esp, 0xc
push 0x10
jmp 0x40abf9
xor eax, eax
mov ecx, dword [ebp + 0x194]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b376
add ebp, 0x198
leave
ret