Function at 0x476200
Capabilities:
Create directory
Get common file path
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x4b7e49
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x258
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x165]
mov byte [esp + 0x164], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 1
lea eax, [esp + 0x168]
push 0x1a
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString_3
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x61]
mov byte [esp + 0x60], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x1878]
lea edx, [esp + 0x164]
stosw word es:[edi], ax
push ecx
push edx
stosb byte es:[edi], al
push str._sTencentQQGameDdzRpgSetting_u_dsk.ini
lea eax, [esp + 0x6c]
push 0x103
push eax
mov dword [esp + 0x284], ebx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea ecx, [esp + 0x60]
lea ebp, [esi + 0x5b8]
push ecx
mov ecx, ebp
call fcn.00424520
mov dl, byte [esp + 0x17]
push ebx
lea ecx, [esp + 0x54]
mov dword [esp + 0x14], eax
mov byte [esp + 0x54], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x17]
mov edi, str.SkinDesk
mov byte [esp + 0x18], al
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x270], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x1c], ebx
push ecx
push str.SkinDesk
lea ecx, [esp + 0x20]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
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 eax, dword [esp + 0x10]
mov byte [esp + 0x270], 2
cmp eax, ebx
je 0x47643d
lea ecx, [esp + 0x164]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
push 0x4d7b20
lea ecx, [esp + 0x14]
mov byte [esp + 0x274], 3
call fcn.004ac100
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.MSVCRT.dll__mkdir]
push edx
call edi
add esp, 4
lea ecx, [esp + 0x10]
push str.QQGame
call fcn.004ac100
mov eax, dword [esp + 0x10]
push eax
call edi
add esp, 4
lea ecx, [esp + 0x10]
push str.DDzRpg
call fcn.004ac100
mov ecx, dword [esp + 0x10]
push ecx
call edi
add esp, 4
lea ecx, [esp + 0x10]
push str.Setting
call fcn.004ac100
mov edx, dword [esp + 0x10]
push edx
call edi
add esp, 4
lea ecx, [esp + 0x40]
call fcn.004ac0fa
push ebx
lea eax, [esp + 0x64]
push 0x1001
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0x27c], 4
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x4764c5
xor ecx, ecx
push str._SkinDesk_
mov dword [esp + 0x31], ecx
lea edx, [esp + 0x30]
mov dword [esp + 0x35], ecx
push 0x11
mov dword [esp + 0x3d], ecx
push edx
mov dword [esp + 0x45], ecx
mov byte [esp + 0x38], bl
mov byte [esp + 0x49], cl
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0xc
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x40]
push 0x12
push eax
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x60]
push ecx
mov ecx, ebp
call fcn.00424520
cmp eax, ebx
mov byte [esp + 0x270], 3
lea ecx, [esp + 0x40]
jne 0x4764dd
call sub.MFC42.DLL_CFile::CFile
lea ecx, [esp + 0x10]
mov byte [esp + 0x270], 2
call fcn.004ac05e
lea edx, [esp + 0x60]
lea eax, [esi + 0x1708]
push edx
push 0x104
push eax
push 0x4daff4
push str.FileName
push str.SkinDesk
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea ecx, [esp + 0x60]
push ecx
push ebx
push str.DrawType
push str.SkinDesk
call edi
lea edx, [esp + 0x60]
mov dword [esi + 0x180c], eax
push edx
push 1
push str.UseDefaultDesk
push str.SkinDesk
call edi
cmp eax, ebx
mov dword [esi + 0x1810], eax
jne 0x4764a9
mov ecx, dword [0x5156d8]
call fcn.00441050
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4764fe
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4764f5
cmp al, 0xff
je 0x4764f5
dec al
mov byte [ecx], al
jmp 0x4764fe
push ebx
push ebx
push str.Create_Config_File_error_
call sub.MFC42.DLL_AfxMessageBox_1
mov byte [esp + 0x270], 3
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CFile::CFile
lea ecx, [esp + 0x10]
mov byte [esp + 0x270], 2
call fcn.004ac05e
jmp 0x4764a9
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x54]
mov dword [esp + 0x1c], ebx
cmp eax, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
je 0x47652f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x476526
cmp al, 0xff
je 0x476526
dec al
mov byte [ecx], al
jmp 0x47652f
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x28]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x270], 0xffffffff
call fcn.004ac05e
mov ecx, dword [esp + 0x268]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x264
ret