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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4318d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1708
call fcn.00430f20
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
test eax, eax
jne 0x426a95
mov dword [ebp - 0x44], eax
jmp 0x426a9b
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x44], ecx
mov ebx, dword [eax + 0x58]
mov dword [ebp - 0x40], ebx
test ebx, ebx
je 0x4274dd
mov esi, vtable.SaFile.0
or edi, 0xffffffff
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], edi
call dword [sym.imp.mfc90.dll_Ordinal_316]
mov dword [ebp - 0x34], vtable.SaFileWriter.0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edi
call dword [sym.imp.mfc90.dll_Ordinal_316]
mov dword [ebp - 0x28], vtable.SaFileReader.0
mov eax, dword [ebx + 4]
push 0x100
lea edx, [ebp - 0x614]
push edx
push 0x100
lea ecx, [ebp - 0x514]
push ecx
push 0x100
lea edx, [ebp - 0x714]
push edx
push 3
lea ecx, [ebp - 0xb0]
push ecx
push eax
call dword [sym.imp.MSVCR90.dll__splitpath_s]
push 0x103
lea edx, [ebp - 0x1eb]
push 0
push edx
mov byte [ebp - 0x1ec], 0
call sub.MSVCR90.dll_memset
add esp, 0x30
lea eax, [ebp - 0x1ec]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [ebp - 0x1ec]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x426b6f
cmp byte [ebp + eax - 0x1ed], 0x5c
lea eax, [ebp + eax - 0x1ed]
jne 0x426b6f
mov byte [eax], 0
lea edx, [ebp - 0x614]
push edx
lea eax, [ebp - 0x514]
push eax
lea ecx, [ebp - 0x1ec]
push ecx
lea edx, [ebp - 0x414]
push str._s_s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, vtable.SATRegMgr.0
add esp, 0x14
lea ecx, [ebp - 0x38]
mov byte [ebp + 0xb], 0
mov dword [ebp - 0x3c], esi
call dword [sym.imp.mfc90.dll_Ordinal_316]
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 2
call fcn.00419fd0
lea ecx, [ebp - 0x1c]
push ecx
push str.OutputCopyRightOn
lea edx, [ebp - 0x3c]
push edx
mov dword [ebp - 0x1c], 0
call fcn.00419bc0
test al, al
je 0x426be2
cmp dword [ebp - 0x1c], 0
je 0x426be2
mov byte [ebp + 0xb], 1
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x3c], esi
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov byte [ebp - 4], 3
mov esi, dword [ebx + 4]
mov dword [ebp - 0x1c], 0
call fcn.004160d0
cmp eax, 0x8004200d
jne 0x426c1f
mov dword [ebp - 0xa0], eax
push 0x43c408
lea eax, [ebp - 0xa0]
push eax
call sub.MSVCR90.dll__CxxThrowException
mov ebx, dword [ebx]
push ebx
lea ecx, [ebp - 0x28]
call fcn.004308d0
test eax, eax
jge 0x426c45
push 0x43c408
lea ecx, [ebp - 0xac]
push ecx
mov dword [ebp - 0xac], eax
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
cmp eax, edi
je 0x426c5b
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
jne 0x426c76
push 0x43c408
lea edx, [ebp - 0xa8]
push edx
mov dword [ebp - 0xa8], 0x80042009
call sub.MSVCR90.dll__CxxThrowException
push 0x44
call sub.mfc90.dll_Ordinal_798
mov esi, eax
add esp, 4
test esi, esi
je 0x426dec
mov eax, 0x38e38e39
mul ebx
shr edx, 6
lea ecx, [edx + edx*8]
lea edx, [ecx*4 + 0x3e7]
mov eax, 0x10624dd3
mul edx
shr edx, 6
movzx eax, dx
mov dword [esi + 0x40], 1
mov ecx, eax
shr ecx, 8
mov byte [ebp - 0x18], cl
mov byte [ebp - 0x17], al
movzx edx, word [ebp - 0x18]
mov word [esi + 6], dx
mov ecx, ebx
shr ecx, 0x10
mov byte [ebp - 0x17], cl
mov cl, byte [ebp + 0xb]
lea edi, [esi + 6]
mov eax, ebx
shr eax, 0x18
mov edx, ebx
shr edx, 8
mov byte [ebp - 0x18], al
neg cl
mov byte [ebp - 0x16], dl
mov byte [ebp - 0x15], bl
mov eax, dword [ebp - 0x18]
mov dword [esi + 8], eax
sbb cl, cl
mov eax, 0x20202020
mov byte [esi], 0x53
mov byte [esi + 1], 0x42
mov byte [esi + 2], 0x47
mov byte [esi + 3], 0x4d
mov byte [esi + 0xc], 2
mov byte [esi + 0xd], 2
mov byte [esi + 0xe], 1
mov byte [esi + 0xf], 3
mov byte [esi + 0x11], 0xc
push 0x10
and cl, 3
mov byte [esi + 0x10], cl
lea edx, [ebp - 0xc0]
push edx
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], eax
lea eax, [esi + 0x12]
push 0x2e
push eax
mov dword [ebp - 0x1c], esi
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov eax, 0x20202020
push 0x1c
lea ecx, [ebp - 0xdc]
push ecx
lea edx, [esi + 0x22]
push 0x1e
push edx
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd0], eax
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xc4], eax
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov al, 0xf
mov byte [ebp - 0x18], al
mov byte [ebp - 0x17], al
mov ax, word [ebp - 0x18]
add esp, 0x20
mov edx, edi
mov word [esi + 0x3e], ax
call fcn.00425380
movzx eax, ax
mov ecx, eax
shr ecx, 8
mov byte [ebp - 0x18], cl
mov byte [ebp - 0x17], al
movzx edx, word [ebp - 0x18]
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x34]
mov word [esi + 4], dx
call fcn.004307c0
test eax, eax
jge 0x426e01
push 0x43c408
lea ecx, [ebp - 0x9c]
push ecx
mov dword [ebp - 0x9c], eax
call sub.MSVCR90.dll__CxxThrowException
push 0x43c408
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x50], 0x8007000e
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], 0
cmp eax, 0xffffffff
jne 0x426e17
mov eax, 0x80042007
jmp 0x426e42
push 0
lea edx, [ebp - 0x38]
push edx
push 0x40
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x426e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x70
sete cl
lea ecx, [ecx*4 - 0x7ffbdffc]
mov eax, ecx
push 0x43c408
lea edx, [ebp - 0x58]
push edx
mov dword [ebp - 0x58], eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x38], 0x40
je 0x426e6e
push 0x43c408
lea eax, [ebp - 0x7c]
push eax
mov dword [ebp - 0x7c], 0x80042004
call sub.MSVCR90.dll__CxxThrowException
mov edi, ebx
test edi, edi
je 0x426f80
mov esi, edi
cmp edi, 0x1000
jb 0x426e87
mov esi, 0x1000
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], 0
cmp eax, 0xffffffff
jne 0x426e9d
mov eax, 0x80042007
jmp 0x426ec0
push 0
lea ecx, [ebp - 0x18]
push ecx
push esi
lea edx, [ebp - 0x1714]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
neg eax
sbb eax, eax
and eax, 0x7ffbdffd
add eax, 0x80042003
mov bl, 1
test bl, bl
je 0x426edb
test eax, eax
jge 0x426edb
mov dword [ebp - 0x60], eax
push 0x43c408
lea eax, [ebp - 0x60]
push eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x18], esi
je 0x426ef9
test bl, bl
je 0x426ef9
push 0x43c408
lea ecx, [ebp - 0x80]
push ecx
mov dword [ebp - 0x80], 0x80042003
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
jne 0x426f08
mov eax, 0x80042007
jmp 0x426f3c
push 0
lea edx, [ebp - 0x38]
push edx
push esi
lea ecx, [ebp - 0x1714]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x426f3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp eax, 0x70
sete dl
lea edx, [edx*4 - 0x7ffbdffc]
mov eax, edx
jmp 0x426f3c
xor eax, eax
test bl, bl
je 0x426f55
test eax, eax
jge 0x426f55
mov dword [ebp - 0x68], eax
push 0x43c408
lea eax, [ebp - 0x68]
push eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x38], esi
je 0x426f79
test bl, bl
je 0x426f79
push 0x43c408
lea ecx, [ebp - 0x88]
push ecx
mov dword [ebp - 0x88], 0x80042004
call sub.MSVCR90.dll__CxxThrowException
sub edi, esi
jmp 0x426e70
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
je 0x426fa1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x426f9a
mov eax, 0x80042006
jmp 0x426fa3
mov dword [ebp - 0x24], 0xffffffff
xor eax, eax
mov bl, 1
test bl, bl
je 0x426fbe
test eax, eax
jge 0x426fbe
push 0x43c408
lea edx, [ebp - 0x70]
push edx
mov dword [ebp - 0x70], eax
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
je 0x426fdf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x426fd8
mov eax, 0x80042006
jmp 0x426fe1
mov dword [ebp - 0x30], 0xffffffff
xor eax, eax
test bl, bl
je 0x427000
test eax, eax
jge 0x427000
mov dword [ebp - 0x90], eax
push 0x43c408
lea eax, [ebp - 0x90]
push eax
call sub.MSVCR90.dll__CxxThrowException
mov dword [ebp - 4], 1
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x427025
lea ecx, [esi + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x427025
push esi
call sub.mfc90.dll_Ordinal_800
add esp, 4
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea edx, [ebp - 0x414]
mov byte [ebp - 4], 5
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push edx
call ebx
cmp eax, 0xffffffff
je 0x427073
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_820]
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
jne 0x427088
mov dword [ebp - 0x38], 0
jmp 0x427094
push 0x43c408
lea ecx, [ebp - 0x78]
push ecx
mov dword [ebp - 0x78], 0x80042001
call sub.MSVCR90.dll__CxxThrowException
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
mov edi, dword [ebp - 0x40]
mov esi, dword [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4270e4
shr eax, 4
not al
and al, 1
je 0x4270e4
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x4270e4
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x4270e4
push 0x43c408
lea edx, [ebp - 0xa4]
push edx
mov dword [ebp - 0xa4], 0x80004005
call sub.MSVCR90.dll__CxxThrowException
mov esi, dword [edi + 4]
test esi, esi
jne 0x427107
mov eax, 0x80070057
mov dword [ebp - 0x84], eax
push 0x43c408
lea eax, [ebp - 0x84]
push eax
call sub.MSVCR90.dll__CxxThrowException
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call ebx
cmp eax, 0xffffffff
jne 0x427128
mov eax, 0x80042001
jmp 0x4270f0
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x30], eax
call dword [sym.imp.mfc90.dll_Ordinal_820]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], 0
cmp eax, 0xffffffff
jne 0x42714b
mov eax, 0x80042007
jmp 0x42716e
push 0
lea ecx, [ebp - 0x1c]
push ecx
mov esi, 0x40
push esi
lea edx, [ebp - 0x30c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42717f
mov eax, 0x80042003
mov dword [ebp - 0x48], eax
push 0x43c408
lea eax, [ebp - 0x48]
push eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x1c], esi
je 0x42719f
push 0x43c408
lea ecx, [ebp - 0x8c]
push ecx
mov dword [ebp - 0x8c], 0x80042003
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
jne 0x4271ae
mov eax, 0x80042007
jmp 0x4271de
push 0
lea edx, [ebp - 0x40]
push edx
push esi
lea ecx, [ebp - 0x30c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4271f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp eax, 0x70
sete dl
lea edx, [edx*4 - 0x7ffbdffc]
mov eax, edx
mov dword [ebp - 0x98], eax
push 0x43c408
lea eax, [ebp - 0x98]
push eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x40], esi
je 0x427215
push 0x43c408
lea ecx, [ebp - 0x94]
push ecx
mov dword [ebp - 0x94], 0x80042004
call sub.MSVCR90.dll__CxxThrowException
mov ebx, dword [ebp - 0x38]
add ebx, 0xffffffc0
mov edi, ebx
lea ecx, [ecx]
test edi, edi
je 0x42735f
mov esi, edi
cmp edi, 0x120
jb 0x427237
mov esi, 0x120
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], 0
cmp eax, 0xffffffff
jne 0x42724d
mov eax, 0x80042007
jmp 0x427270
push 0
lea edx, [ebp - 0x1c]
push edx
push esi
lea ecx, [ebp - 0x30c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
neg eax
sbb eax, eax
and eax, 0x7ffbdffd
add eax, 0x80042003
mov cl, 1
test cl, cl
je 0x42728b
test eax, eax
jge 0x42728b
push 0x43c408
lea edx, [ebp - 0x4c]
push edx
mov dword [ebp - 0x4c], eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x1c], esi
je 0x4272a9
test cl, cl
je 0x4272a9
push 0x43c408
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], 0x80042003
call sub.MSVCR90.dll__CxxThrowException
cmp byte [ebp + 0xb], 0
je 0x4272bf
cmp byte [ebp - 0x309], 0xc0
jne 0x4272bf
mov byte [ebp - 0x309], 0xcc
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
jne 0x4272ce
mov eax, 0x80042007
jmp 0x427302
push 0
lea ecx, [ebp - 0x40]
push ecx
push esi
lea edx, [ebp - 0x30c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x427300
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x70
sete cl
lea ecx, [ecx*4 - 0x7ffbdffc]
mov eax, ecx
jmp 0x427302
xor eax, eax
mov cl, 1
test cl, cl
je 0x42731d
test eax, eax
jge 0x42731d
push 0x43c408
lea edx, [ebp - 0x5c]
push edx
mov dword [ebp - 0x5c], eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x40], esi
je 0x42733b
test cl, cl
je 0x42733b
push 0x43c408
lea eax, [ebp - 0x64]
push eax
mov dword [ebp - 0x64], 0x8004200b
call sub.MSVCR90.dll__CxxThrowException
sub edi, esi
mov eax, ebx
sub eax, edi
imul eax, eax, 0x64
xor edx, edx
div ebx
mov ecx, dword [ebp - 0x44]
push 0
push eax
push 0x401
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x427220
mov edx, dword [ebp - 0x20]
cmp dword [edx - 0xc], 0
jne 0x42736f
mov eax, 0x80042007
jmp 0x4273a7
mov eax, dword [ebp - 0x24]
cmp eax, 0xffffffff
je 0x427389
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x427389
mov dword [ebp - 0x24], 0xffffffff
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
inc eax
neg eax
sbb eax, eax
and eax, 0x80042005
mov bl, 1
test bl, bl
je 0x4273c2
test eax, eax
jge 0x4273c2
push 0x43c408
lea edx, [ebp - 0x6c]
push edx
mov dword [ebp - 0x6c], eax
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x30]
or edi, 0xffffffff
cmp eax, edi
je 0x4273e1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4273de
mov eax, 0x80042006
jmp 0x4273e3
mov dword [ebp - 0x30], edi
xor eax, eax
test bl, bl
je 0x4273fc
test eax, eax
jge 0x4273fc
mov dword [ebp - 0x74], eax
push 0x43c408
lea eax, [ebp - 0x74]
push eax
call sub.MSVCR90.dll__CxxThrowException
mov ecx, dword [ebp - 0x44]
push 0
push 0
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x24]
mov esi, vtable.SaFile.0
mov dword [ebp - 0x28], esi
cmp eax, edi
je 0x42742c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x42742c
mov dword [ebp - 0x24], edi
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], esi
cmp eax, edi
je 0x42744d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x42744d
mov dword [ebp - 0x30], edi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4