Function at 0x401330
Capabilities:
Check if file exists
Get file attributes
Get memory capacity
Set file attributes
Set registry value
Write file on windows

Disassembly:
sub esp, 0xc84
mov eax, dword [0x43e0a0]
xor eax, esp
mov dword [esp + 0xc7c], eax
push ebx
push ebp
push esi
push edi
xor edi, edi
push 0x206
lea eax, [esp + 0x266]
push edi
push eax
xor ebp, ebp
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
xor ebx, ebx
mov word [esp + 0x26c], di
call fcn.004193c0
add esp, 0xc
push 0x206
lea ecx, [esp + 0x5e]
push edi
push ecx
mov word [esp + 0x64], di
call fcn.004193c0
add esp, 0xc
push 0x206
lea edx, [esp + 0x46e]
push edi
push edx
mov word [esp + 0x474], di
call fcn.004193c0
add esp, 0xc
push 0x206
lea eax, [esp + 0x676]
push edi
push eax
mov word [esp + 0x67c], di
call fcn.004193c0
add esp, 0xc
push 0x206
lea ecx, [esp + 0x87e]
push edi
push ecx
mov word [esp + 0x884], di
call fcn.004193c0
add esp, 0xc
push 0x206
lea edx, [esp + 0xa86]
push edi
push edx
mov word [esp + 0xa8c], di
call fcn.004193c0
add esp, 0xc
push 0x104
lea eax, [esp + 0x264]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, edi
jg 0x40143c
push str.KGameConfigApp::_CheckSystemMemory
push 0x7b
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
cmp eax, 0x104
jb 0x401463
push str.KGameConfigApp::_CheckSystemMemory
push 0x7c
push str.nRetCode____countof_szApplicationPath_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
lea ecx, [esp + 0x260]
push 0x5c
push ecx
call fcn.00416b85
add esp, 8
cmp eax, edi
jne 0x401499
push str.KGameConfigApp::_CheckSystemMemory
push 0x7f
push str.pchLastSlash
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
push str.config.ini
lea edx, [esp + 0x264]
push edx
push 0x435c44
mov word [eax + 2], di
lea eax, [esp + 0x64]
push 0x104
push eax
call fcn.00416bb5
add esp, 0x14
cmp eax, edi
jg 0x4014e8
push str.KGameConfigApp::_CheckSystemMemory
push 0x85
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
cmp eax, 0x104
jb 0x401512
push str.KGameConfigApp::_CheckSystemMemory
push 0x86
push str.nRetCode____countof_szConfigFileName_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
push str.version.cfg
lea ecx, [esp + 0x264]
push ecx
push 0x435c44
lea edx, [esp + 0x67c]
push 0x104
push edx
call fcn.00416bb5
add esp, 0x14
cmp eax, edi
jg 0x401560
push str.KGameConfigApp::_CheckSystemMemory
push 0x8c
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
cmp eax, 0x104
jb 0x40158a
push str.KGameConfigApp::_CheckSystemMemory
push 0x8d
push str.nRetCode____countof_szVersionCfgFileName_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
push str..bak
lea eax, [esp + 0x5c]
push eax
push 0x435c44
lea ecx, [esp + 0x474]
push 0x104
push ecx
call fcn.00416bb5
add esp, 0x14
cmp eax, edi
jg 0x4015d5
push str.KGameConfigApp::_CheckSystemMemory
push 0x92
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
cmp eax, 0x104
jb 0x4015ff
push str.KGameConfigApp::_CheckSystemMemory
push 0x93
push str.nRetCode____countof_szTempConfigFileName_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
lea edx, [esp + 0x878]
push edx
lea ecx, [esp + 0x674]
call fcn.00401900
test eax, eax
jne 0x40163a
push str.KGameConfigApp::_CheckSystemMemory
push 0x96
push str.nRetCode
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
push 0x40
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.004193c0
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
jg 0x401684
push str.KGameConfigApp::_CheckSystemMemory
push 0x9c
push str.nRetCode___0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
shrd eax, edx, 0xa
shr edx, 0xa
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
cmp eax, 0x406
jge 0x401802
lea eax, [esp + 0x468]
push eax
call fcn.00416c86
add esp, 4
lea ecx, [esp + 0x468]
push 0x435cf4
push ecx
call fcn.00416d76
mov ebx, eax
add esp, 8
cmp ebx, edi
jne 0x4016f8
push str.KGameConfigApp::_CheckSystemMemory
push 0xa4
push str.pFile
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
push ebx
push 0x1203
push 1
push str._UIEditor__nEnable0_nPathpluginUiEditor_n_n_Main__nStandardCanvasWidth1280_nStandardCanvasHeight960_nCanvasWidth1280_nCanvasHeight975_nX_4_nY_4_nEnableReloadFont1_nFullScreen0_nPanauision0_nExclusiVeMode0_nRefreshRate0_nMaximize1_n_n_MovieRecord__nEnable0_nSize2_nFilter3_nFps25_nQuality11000000_nEncodermpeg2_n_n_Debug__n3DEngineDebugInfo0_nConsole0_nPakFirst0_n_n_Represent__nRepresentSFX0_n_n_Log__nLevel255_n_n_KG3DENGINE__nForceShaderModel2_nTextureScale1_nGrassAnimation0_nRenderGrass1_nAmibentShaderOnly0_nWaterReflection0_nWaterRefraction0_nPostRenderEffect0_nBloomEnable0_nShockWaveEnable0_nHSIEnable0_nModelShadowType0_nModelShadowParams0.800000_1.000000_1.000000_32.000000_1000.000000_2500.000000_20000.000000_0.450000_nMotionBlurEnable0_nCammeraDistance20000.000000_nCammeraAngle0.785398_nDetailEnable0_nWaterReflectEnvironment0_nWaterReflectGround0_nWaterReflectNPC0_nWaterReflectEntity0_nUseSpeedTreeLod0_nSampMipFilter2_nSampMinFilter2_nSampMagFilter2_nUseRenderTwiceAlpha0_nGrassAlphaBlend0_nbGodRay0_nbSSAO0_nOutputUsedResource0_nfBillBoardCloudInureDistance100000000.000000_nDefautColorCast00.000000_0.000000_0.000000_0.000000_nDefautColorCast10.000000_0.000000_0.000000_0.000000_nDefautColorCast20.000000_0.000000_0.000000_0.000000_nDefautColorCast30.000000_0.000000_0.000000_0.000000_nDefautColorCast40.000000_0.000000_0.000000_0.000000_nDefautColorCast50.000000_0.000000_0.000000_0.000000_nDefautColorCast60.000000_0.000000_0.000000_0.000000_nDefautColorCast70.000000_0.000000_0.000000_0.000000_nEnableRecord0_nMultiSampleType0_nMultiSampleQuality0_nTripleBuffering0_nVSync0_nColorDepth32_nEnableDynamicConverMap0_nCpuSkin0_nNumCpuThread1_nFlexBodySmooth0_nCpuProcessModelThreadLock0_nEnablePhysics1_nMultiTextureRender0_nTerrainDetail0_nVegetationDensity3_nWaterDetail0_nSelectorScale2_nEnableDynamicUnload1_nEnableBladesSmoot1_nMaxAnisotropy1_nbHDR0_nbGlobalFog0_nbDOF0_nMinSoundRange10.000000_nCurveCMYKEnable0_nActiveColorCurve0_nEnableDefaultDynamicWeather0_nfWaterAlphaMin0.300000_nfWaterReduHeight400.000000_nnWaterReflTextSize512_nnWaterRefrTextSize1024_nEnableNormalMap0_nEnableGroundNormalMap0_nEnableSpeedTreeNormalMap0_nEnableTimeOptimizeLog0_nEnableDebugBBox0_nbUseModelBsp1_nbEnableModelLod1_nModelLODSwitchGates90000000.000000_300000000.000000_nTerrainLODGates11200_16000_22400_nUseTerrainLOD1_n_n_ENGINEOPTION__nUseMultiThreadLoad1_nUseLogical0_nRenderTerrain1_nRenderGround1_nTerrDynamic1_nShowTestDialog0_nBloomMaxExposure0.200000_nBloomMinExposure0.100000_nBloomRate0.000000_nBloomDelay700.000000_nBloomGate0.300000_nBloomCriticalAngel_max10.000000_nBloomCriticalAngel_min_10.000000_nWaterConfigFiledatapublicdefaultscenewaterconfig.wfx_nHueScale1.000000_nHueBias_0.000000_nSaturationScale1.000000_nSaturationBias0.000000_nfIntensityScale1.000000_nIntensityBias_0.000000_nShockWavePower0.110000_nUseMultiThreadAni0_nNumMultiThreadAni1_nUseMultiThreadCull0_nUseProgressMeshLOD0_nnGodRaySampleNum3_nfGodRayDensity0.380000_nfGodRayWeight0.100000_nfGodRayDecay1.000000_nfGodRayExposure0.270000_nfLimitAngle6.283185_nnSSAOLevel1_nfSSAOSampleRadius20.000000_nfSSAODarkFact0.500000_nfBlurWeight0.500000_nbEnableAutoReLoadTexture0_nImportOldScene1_nbEnabledAreaShadow0_nfBloomExposure10.800000_nfBloomExposure20.150000_nfBloomGaussCoefficient3.000000_nnBloomSampleNum8_nUseLogicalObject1_nbPackFile0_nbShow3DEngineDebugInfo0_nbMultiThreadLoadAnimation0_nb3DVision0_n_n_SCENEEDITOR__nRUNNERMODELDatapublic_scenerunner_scenerunner.Mesh_nRUNNERMTLDatapublic_scenerunner_scenerunner.Mtl_nRUNNERANIDatapublic_scenerunner_scenerunner.Ani_nRUNNERFACEMODEL_nRUNNERFACEMTL_nUseOtherWorkDirectory0_nWorkDirectoryF:Program_FilesKingsoftJX3_n_n_VIM3D__nUseVIM3D0_n_n_SoundSetting__nTotalVolume0.800000_nUIVolume0.800000_nErrorVolume0.700000_nSceneVolume0.900000_nChVolume0.900000_nBgVolume0.500000_nSilence0_nUiSound1_nErrorSound1_nSceneSound1_nChSound1_nBgMUsic1_nP3DSound1_n
call fcn.00416ee8
add esp, 0x10
cmp eax, 0x1203
je 0x401737
push str.KGameConfigApp::_CheckSystemMemory
push 0xa7
push str.nRetCode__sizeof_CONFIG_INI_
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
push ebx
call fcn.00416fdc
add esp, 4
lea edx, [esp + 0x58]
push edi
push edx
xor ebx, ebx
call fcn.00417124
add esp, 8
cmp eax, 0xffffffff
je 0x4017c6
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
not ecx
and ecx, eax
push ecx
lea edx, [esp + 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x58]
push eax
call fcn.00416c86
add esp, 4
cmp eax, 0xffffffff
jne 0x40179f
xor esi, esi
cmp eax, edi
je 0x4017c6
lea ecx, [esp + 0x58]
push ecx
call fcn.00416c86
add esi, 1
add esp, 4
cmp esi, 3
jl 0x401786
cmp eax, edi
je 0x4017c6
push str.KGameConfigApp::_CheckSystemMemory
push 0xc0
push str.nRetCode__0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x46c]
push eax
call fcn.00417138
add esp, 8
test eax, eax
je 0x401802
push str.KGameConfigApp::_CheckSystemMemory
push 0xc4
push str.nRetCode__0
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
lea ecx, [esp + 0x878]
push ecx
push str.SOFTWAREKingsoftJX3
push str._s_s
lea edx, [esp + 0xa8c]
push 0x104
push edx
call fcn.00416bb5
add esp, 0x14
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push edi
push 0x20006
push edi
push edi
push edi
lea edx, [esp + 0xa9c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x401873
push str.KGameConfigApp::_CheckSystemMemory
push 0xca
push str.nRetCode__ERROR_SUCCESS
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
mov eax, dword [esp + 0x10]
push 2
push 0x435d84
push 1
push edi
push 0x435d88
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4018b1
push str.KGameConfigApp::_CheckSystemMemory
push 0xcd
push str.nRetCode__ERROR_SUCCESS
push str.KGLOG_PROCESS_ERROR__s__at_line__d_in__s_n
push 7
call fcn.004077c0
add esp, 0x14
jmp 0x4018b6
mov ebp, 1
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x4018c9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x10], edi
cmp ebx, edi
je 0x4018d6
push ebx
call fcn.00416fdc
add esp, 4
mov ecx, dword [esp + 0xc8c]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
xor ecx, esp
call fcn.00416863
add esp, 0xc84
ret