Function at 0x408130
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4203b1
mov eax, dword fs:[0]
push eax
mov eax, 0x20bd8
call fcn.0041d6a0
mov eax, dword [0x433028]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x206
mov dword [ebp - 0x20ac0], ecx
xor edi, edi
mov dword [ebp - 0x20ab8], eax
lea ecx, [ebp - 0x422]
xor eax, eax
push edi
push ecx
mov dword [ebp - 0x20abc], edx
mov word [ebp - 0x424], ax
call sub.MSVCR90.dll_memset
push 0x206
lea eax, [ebp - 0x62a]
xor edx, edx
push edi
push eax
mov word [ebp - 0x62c], dx
call sub.MSVCR90.dll_memset
push 0x10000
lea ecx, [ebp - 0x20a64]
push edi
push ecx
mov dword [ebp - 0x20ab4], 0x424508
mov dword [ebp - 0x20a90], edi
mov dword [ebp - 0x20a8c], edi
mov dword [ebp - 0x20a88], edi
call sub.MSVCR90.dll_memset
push 0x10000
lea edx, [ebp - 0x10a64]
push edi
push edx
call sub.MSVCR90.dll_memset
add esp, 0x30
lea eax, [ebp - 0x62c]
push eax
push 0x208
mov dword [ebp - 0x20a74], edi
mov dword [ebp - 0x20a70], edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.SYSTWEAK_ENCRYPT
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jg 0x408253
lea eax, [esi + esi]
call fcn.0041d6d0
mov ebx, esp
cmp ebx, edi
je 0x408253
push esi
push ebx
push 0xffffffffffffffff
push str.SYSTWEAK_ENCRYPT
push edi
xor ecx, ecx
push 3
mov word [ebx], cx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb eax, eax
and eax, ebx
jmp 0x408255
xor eax, eax
lea edx, [ebp - 0x424]
push edx
push edi
push eax
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov edx, dword [ebp - 0x20ab8]
mov esi, dword [sym.imp.MSVCR90.dll__wfopen]
lea ecx, [ebp - 0x10a64]
push 0x42448c
push edx
mov dword [ebp - 0x20a68], edi
mov dword [ebp - 0x20aac], edi
mov dword [ebp - 0x20aa0], 0x10000
mov dword [ebp - 0x20aa4], ecx
mov dword [ebp - 0x20a78], edi
call esi
mov dword [ebp - 0x20a74], eax
lea eax, [ebp - 0x424]
push 0x424494
push eax
call esi
mov ecx, dword [ebp - 0x20a74]
add esp, 0x10
mov dword [ebp - 0x20a70], eax
cmp ecx, edi
je 0x4087c0
cmp eax, edi
je 0x4087c0
push ecx
call dword [sym.imp.MSVCR90.dll__fileno]
push eax
call dword [sym.imp.MSVCR90.dll__filelength]
add esp, 8
mov ecx, eax
mov dword [ebp - 0x20a6c], ecx
cmp dword [ebp - 0x20a78], edi
jne 0x408516
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
push 1
push edi
push edi
push edi
lea ecx, [ebp - 0x20adc]
push ecx
call esi
test eax, eax
je 0x40833f
jmp 0x408320
lea edx, [ebp - 0x20adc]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push edi
push edi
push edi
lea eax, [ebp - 0x20adc]
push eax
call esi
test eax, eax
jne 0x408320
cmp dword [ebp - 0x20aac], edi
jne 0x40837b
mov edx, dword [ebp - 0x20a74]
push edx
lea ecx, [ebp - 0x20a64]
push 0x10000
mov eax, ecx
push 1
push eax
mov dword [ebp - 0x20ab0], ecx
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x20aac], eax
cmp eax, edi
je 0x40846b
push 1
push edi
push edi
push edi
lea ecx, [ebp - 0x20adc]
push ecx
mov dword [ebp - 0x20a68], edi
call esi
test eax, eax
je 0x4083b2
lea edx, [ebp - 0x20adc]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push edi
push edi
push edi
lea eax, [ebp - 0x20adc]
push eax
call esi
test eax, eax
jne 0x408393
mov ebx, 0x10000
sub ebx, dword [ebp - 0x20aa0]
je 0x4083f7
mov ecx, dword [ebp - 0x20a70]
push ecx
push ebx
lea edx, [ebp - 0x10a64]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, ebx
jne 0x408461
lea eax, [ebp - 0x10a64]
mov dword [ebp - 0x20aa4], eax
mov dword [ebp - 0x20aa0], 0x10000
cmp dword [ebp - 0x20a68], edi
jne 0x40846b
mov ecx, dword [ebp - 0x20a6c]
cmp ecx, edi
jne 0x408410
mov eax, 0x64
jmp 0x40843e
cmp ecx, 0x989680
jle 0x408431
mov eax, 0x51eb851f
imul ecx
mov eax, dword [ebp - 0x20aa8]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jmp 0x40843a
mov eax, dword [ebp - 0x20aa8]
imul eax, eax, 0x64
xor edx, edx
div ecx
mov edx, eax
mov eax, dword [ebp - 0x20ab4]
mov eax, dword [eax]
lea ecx, [ebp - 0x20ab4]
call eax
cmp dword [ebp - 0x20a78], edi
je 0x408305
jmp 0x408510
mov dword [ebp - 0x20a68], 0xffffffff
cmp dword [ebp - 0x20a78], edi
jne 0x408510
push 1
push edi
push edi
push edi
lea ecx, [ebp - 0x20adc]
push ecx
mov dword [ebp - 0x20a68], edi
call esi
test eax, eax
je 0x4084af
nop
lea edx, [ebp - 0x20adc]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push edi
push edi
push edi
lea eax, [ebp - 0x20adc]
push eax
call esi
test eax, eax
jne 0x408490
mov ebx, 0x10000
sub ebx, dword [ebp - 0x20aa0]
je 0x408510
mov ecx, dword [ebp - 0x20a70]
push ecx
push ebx
lea edx, [ebp - 0x10a64]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp eax, ebx
jne 0x408506
lea eax, [ebp - 0x10a64]
mov dword [ebp - 0x20aa4], eax
mov dword [ebp - 0x20aa0], 0x10000
cmp dword [ebp - 0x20a68], edi
jne 0x408510
cmp dword [ebp - 0x20a78], edi
je 0x408477
jmp 0x408510
mov dword [ebp - 0x20a68], 0xffffffff
mov ecx, dword [ebp - 0x20a6c]
cmp ecx, edi
jne 0x408521
mov eax, 0x64
jmp 0x40854f
cmp ecx, 0x989680
jle 0x408542
mov eax, 0x51eb851f
imul ecx
mov eax, dword [ebp - 0x20aa8]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jmp 0x40854b
mov eax, dword [ebp - 0x20aa8]
imul eax, eax, 0x64
xor edx, edx
div ecx
mov edx, eax
mov eax, dword [ebp - 0x20ab4]
mov eax, dword [eax]
lea ecx, [ebp - 0x20ab4]
call eax
cmp dword [ebp - 0x20a78], edi
je 0x4085f5
push 0x206
lea edx, [ebp - 0x21a]
xor ecx, ecx
push edi
push edx
mov word [ebp - 0x21c], cx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x42803c
push str.IDS_STR_USERABORT
lea eax, [ebp - 0x20ab8]
push eax
mov ecx, 0x43d668
call dword [sym.imp.SolvusoftWMhelper.dll_public:_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______thiscall_CSystweakApp::LoadStringW_wchar_t_const___wchar_t_const__]
mov ecx, dword [eax]
lea edx, [ebp - 0x21c]
nop
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, di
jne 0x4085b0
lea ecx, [ebp - 0x20ab8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push 3
lea edx, [ebp - 0x21c]
lea ecx, [ebp - 0x20b5c]
push edx
lea eax, [ebp - 0x20b60]
mov dword [ebp - 0x20b60], ecx
call fcn.00403550
mov dword [ebp - 4], edi
jmp 0x408694
mov eax, dword [ebp - 0x20a68]
cmp eax, edi
je 0x4086d5
cmp eax, 1
je 0x4086d5
push 0x206
lea eax, [ebp - 0x21a]
xor edx, edx
push edi
push eax
mov word [ebp - 0x21c], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x42803c
push str.IDS_STR_ZLIBERROR
lea ecx, [ebp - 0x20ab8]
push ecx
mov ecx, 0x43d668
call dword [sym.imp.SolvusoftWMhelper.dll_public:_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______thiscall_CSystweakApp::LoadStringW_wchar_t_const___wchar_t_const__]
mov ecx, dword [eax]
lea edx, [ebp - 0x21c]
mov edi, edi
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, di
jne 0x408650
lea ecx, [ebp - 0x20ab8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push 3
lea eax, [ebp - 0x21c]
lea edx, [ebp - 0x20b5c]
push eax
lea eax, [ebp - 0x20b60]
mov dword [ebp - 0x20b60], edx
call fcn.00403550
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x20ab4]
mov edx, dword [ebp - 0x20b60]
mov eax, dword [eax + 4]
lea ecx, [ebp - 0x20ab4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20b60]
lea ecx, [ebp - 0x20b5c]
cmp eax, ecx
je 0x408799
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
jmp 0x408799
push 0x206
lea eax, [ebp - 0x832]
xor edx, edx
push edi
push eax
mov word [ebp - 0x834], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x42803c
push str.IDS_STR_SUCCESS
lea ecx, [ebp - 0x20ab8]
push ecx
mov ecx, 0x43d668
call dword [sym.imp.SolvusoftWMhelper.dll_public:_class_ATL::CStringT_wchar_t__class_StrTraitMFC_DLL_wchar_t__class_ATL::ChTraitsCRT_wchar_t______thiscall_CSystweakApp::LoadStringW_wchar_t_const___wchar_t_const__]
mov ecx, dword [eax]
lea edx, [ebp - 0x834]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, di
jne 0x408717
lea ecx, [ebp - 0x20ab8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push 3
lea eax, [ebp - 0x834]
lea edx, [ebp - 0x20be0]
push eax
lea eax, [ebp - 0x20be4]
mov dword [ebp - 0x20be4], edx
call fcn.00403550
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x20ab4]
mov edx, dword [ebp - 0x20be4]
mov eax, dword [eax + 4]
lea ecx, [ebp - 0x20ab4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20be4]
lea ecx, [ebp - 0x20be0]
cmp eax, ecx
je 0x408793
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [ebp - 0x20a68], edi
mov edx, dword [ebp - 0x20a74]
mov esi, dword [sym.imp.MSVCR90.dll_fclose]
push edx
call esi
mov eax, dword [ebp - 0x20a70]
push eax
call esi
add esp, 8
mov dword [ebp - 0x20a74], edi
mov dword [ebp - 0x20a70], edi
lea ecx, [ebp - 0xa64]
push ecx
lea edx, [ebp - 0x424]
push edx
mov dword [ebp - 0xa64], edi
mov dword [ebp - 0xa60], edi
mov dword [ebp - 0xa5c], edi
mov dword [ebp - 0xa58], edi
mov dword [ebp - 0xa54], edi
mov dword [ebp - 0xa50], edi
call sub.mfc90u.dll_CFile::GetStatus
mov ecx, dword [ebp - 0xa48]
mov esi, dword [ebp - 0x20abc]
mov eax, dword [ebp - 0xa4c]
lea edx, [ebp - 0x424]
mov dword [esi + 4], ecx
mov ecx, dword [ebp - 0x20ac0]
push edx
mov dword [esi], eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov ecx, dword [esi + 4]
mov eax, dword [esi]
push edi
push 2
push ecx
push eax
mov dword [0x43d648], eax
mov dword [0x43d64c], ecx
call fcn.0041d5b0
mov dword [0x43d640], eax
mov dword [0x43d644], edx
mov al, 1
lea esp, [ebp - 0x20bf4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041cef2
mov esp, ebp
pop ebp
ret 4