Function at 0x401040
Capabilities:
Check mutex on windows
Create directory
Get common file path
Read file on windows
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x103c
call fcn.00419580
mov eax, dword [0x422004]
xor eax, esp
mov dword [esp + 0x1038], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [0x424cd0], eax
lea eax, [esp + 0x128]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], ebx
test eax, eax
je 0x40110b
push 0x100
lea eax, [esp + 0x52c]
push eax
push 0x100
lea eax, [esp + 0x634]
push eax
push 0x100
lea eax, [esp + 0x3c]
push eax
push 3
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x148]
push eax
call fcn.0040aca6
add esp, 0x24
push 0x42d258
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x730]
push 0x420208
push eax
call esi
add esp, 0x10
lea eax, [esp + 0x728]
push eax
call ebx
mov esi, dword [0x424c34]
test esi, esi
jne 0x401155
push 0x14
call fcn.00406058
mov esi, eax
add esp, 4
mov ecx, esi
push 0x400
mov dword [esi], vtable.CNameList.0
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.004053e0
mov dword [0x424c34], esi
push str.game
mov ecx, esi
call fcn.00405470
mov esi, dword [0x428e78]
test esi, esi
jne 0x4011ab
push 0x14
call fcn.00406058
mov esi, eax
add esp, 4
mov ecx, esi
push 0x400
mov dword [esi], vtable.CNameList.0
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.004053e0
mov dword [0x428e78], esi
push str.config
mov ecx, esi
call fcn.00405470
mov ecx, dword [0x428e78]
sub esp, 0xc
push str.configExeVolumeAdjustFlag
call fcn.00405860
cmp eax, 0xffffffff
je 0x4013c0
add eax, 1
jns 0x4011dc
xor eax, eax
jmp 0x4011f1
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x4011eb
xor eax, eax
jmp 0x4011f1
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
test eax, eax
je 0x4013c0
mov ecx, dword [0x428e78]
sub esp, 0xc
push str.volumeMin
call fcn.00405860
cmp eax, 0xffffffff
je 0x401246
add eax, 1
jns 0x401223
xor eax, eax
jmp 0x401238
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x401232
xor eax, eax
jmp 0x401238
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x428e8c], eax
mov ecx, dword [0x428e78]
sub esp, 0xc
push str.volumeMax
call fcn.00405860
cmp eax, 0xffffffff
je 0x40128f
add eax, 1
jns 0x401267
xor eax, eax
jmp 0x40127c
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x401276
xor eax, eax
jmp 0x40127c
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
mov ecx, eax
add esp, 4
mov dword [0x42294c], ecx
jmp 0x401295
mov ecx, dword [0x42294c]
mov eax, dword [0x428e8c]
sub esp, 0xc
mov dword [0x4228c0], ecx
mov dword [0x4228e4], ecx
mov ecx, dword [0x428e78]
push str.volumeMinXAudio2
mov dword [0x424c30], eax
mov dword [0x424d78], eax
call fcn.00405860
cmp eax, 0xffffffff
je 0x4012f4
add eax, 1
jns 0x4012d1
xor eax, eax
jmp 0x4012e6
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x4012e0
xor eax, eax
jmp 0x4012e6
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x424d78], eax
mov ecx, dword [0x428e78]
sub esp, 0xc
push str.volumeMaxXAudio2
call fcn.00405860
cmp eax, 0xffffffff
je 0x401338
add eax, 1
jns 0x401315
xor eax, eax
jmp 0x40132a
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x401324
xor eax, eax
jmp 0x40132a
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x4228e4], eax
mov ecx, dword [0x428e78]
sub esp, 0xc
push str.volumeMinWin10
call fcn.00405860
cmp eax, 0xffffffff
je 0x40137c
add eax, 1
jns 0x401359
xor eax, eax
jmp 0x40136e
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x401368
xor eax, eax
jmp 0x40136e
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x424d78], eax
mov ecx, dword [0x428e78]
sub esp, 0xc
push str.volumeMaxWin10
call fcn.00405860
cmp eax, 0xffffffff
je 0x4013c0
add eax, 1
jns 0x40139d
xor eax, eax
jmp 0x4013b2
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x4013ac
xor eax, eax
jmp 0x4013b2
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x4228e4], eax
push 0x100
lea eax, [esp + 0x140]
mov dword [esp + 0x12c], 0x11c
push 0
push eax
mov dword [esp + 0x138], 0
mov dword [esp + 0x13c], 0
mov dword [esp + 0x140], 0
mov dword [esp + 0x144], 0
call fcn.00406fa0
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
xor eax, eax
mov word [esp + 0x23c], ax
mov dword [esp + 0x23e], eax
push 3
push 0x20
push 3
push 1
push 3
push 2
push eax
push eax
mov word [esp + 0x262], ax
call esi
push edx
push eax
call esi
push edx
push eax
call esi
push edx
push eax
push 0x23
lea eax, [esp + 0x134]
mov dword [esp + 0x138], 0xa
xor ecx, ecx
mov dword [esp + 0x13c], 0
push eax
mov word [esp + 0x24c], cx
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
movzx ecx, byte [0x424cc8]
test eax, eax
mov edx, 1
mov esi, str.nnnConfigMutexName
cmovne ecx, edx
sub esp, 0xc
mov byte [0x424cc8], cl
mov ecx, dword [0x424c34]
push str.mutexName
call fcn.00405860
mov ecx, dword [0x424c34]
cmp eax, 0xffffffff
je 0x4014cb
lea esi, [eax + 1]
test esi, esi
jns 0x4014bc
xor esi, esi
jmp 0x4014cb
cmp esi, dword [ecx + 8]
jl 0x4014c5
xor esi, esi
jmp 0x4014cb
shl esi, 7
add esi, dword [ecx + 0xc]
sub esp, 0xc
push str.codeByte
call fcn.00405860
cmp eax, 0xffffffff
je 0x401509
add eax, 1
jns 0x4014e6
xor eax, eax
jmp 0x4014fb
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x4014f5
xor eax, eax
jmp 0x4014fb
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x4228c8], eax
push esi
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esp + 0x1c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
call eax
cmp eax, 0xb7
jne 0x4015cd
cmp dword [0x4228c8], 1
push 0
push str.Error
je 0x401545
push 0x41f708
jmp 0x40154a
push str.Cannot:DoubleStart_PlayingStart
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [0x424c34]
test esi, esi
je 0x40159d
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401587
push eax
call fcn.00405e58
mov dword [esi + 0xc], 0
add esp, 4
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov esi, dword [0x424c34]
test esi, esi
je 0x401593
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov dword [0x424c34], 0
cmp byte [0x42d258], 0
je 0x401a2e
push 0x42d258
call ebx
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1038]
xor ecx, esp
call fcn.00405e47
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x424c34]
sub esp, 0xc
xor ebx, ebx
push str.saveFolderType
call fcn.00405860
cmp eax, 0xffffffff
je 0x401610
add eax, 1
jns 0x4015f0
xor eax, eax
jmp 0x401605
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x4015ff
xor eax, eax
jmp 0x401605
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov ebx, eax
mov ecx, dword [0x424c34]
sub esp, 0xc
xor edi, edi
push str.saveCompanyFolder
call fcn.00405860
mov ecx, dword [0x424c34]
cmp eax, 0xffffffff
je 0x40164a
lea edi, [eax + 1]
test edi, edi
jns 0x40163b
xor edi, edi
jmp 0x40164a
cmp edi, dword [ecx + 8]
jl 0x401644
xor edi, edi
jmp 0x40164a
shl edi, 7
add edi, dword [ecx + 0xc]
sub esp, 0xc
xor esi, esi
push str.saveGameFolder
call fcn.00405860
cmp eax, 0xffffffff
je 0x40167d
lea esi, [eax + 1]
test esi, esi
jns 0x401669
xor esi, esi
jmp 0x40167d
mov eax, dword [0x424c34]
cmp esi, dword [eax + 8]
jl 0x401677
xor esi, esi
jmp 0x40167d
shl esi, 7
add esi, dword [eax + 0xc]
test ebx, ebx
jne 0x401696
xor ecx, ecx
call fcn.00405090
mov byte [0x42db60], bl
mov byte [0x42d760], bl
jmp 0x4016ab
mov ecx, ebx
call fcn.00405090
mov ecx, edi
call fcn.004051a0
mov ecx, esi
call fcn.00405210
mov dword [0x42d35c], 0
call fcn.00405280
mov ecx, dword [0x424c34]
sub esp, 0xc
mov dword [0x424c24], ebx
push str.hideDirect2D
call fcn.00405860
cmp eax, 0xffffffff
je 0x401704
add eax, 1
jns 0x4016e1
xor eax, eax
jmp 0x4016f6
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x4016f0
xor eax, eax
jmp 0x4016f6
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x424cd8], eax
mov ecx, dword [0x424c34]
sub esp, 0xc
push str.hideXAudio2
call fcn.00405860
cmp eax, 0xffffffff
je 0x401748
add eax, 1
jns 0x401725
xor eax, eax
jmp 0x40173a
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x401734
xor eax, eax
jmp 0x40173a
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x428de4], eax
mov ecx, dword [0x424c34]
sub esp, 0xc
push str.useExpCheckConfig
call fcn.00405860
cmp eax, 0xffffffff
je 0x40178c
add eax, 1
jns 0x401769
xor eax, eax
jmp 0x40177e
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x401778
xor eax, eax
jmp 0x40177e
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x42cf4c], eax
mov ecx, dword [0x424c34]
sub esp, 0xc
push str.useExpRadioConfig
call fcn.00405860
cmp eax, 0xffffffff
je 0x4017d0
add eax, 1
jns 0x4017ad
xor eax, eax
jmp 0x4017c2
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x4017bc
xor eax, eax
jmp 0x4017c2
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x428eb0], eax
mov ecx, dword [0x424c34]
sub esp, 0xc
push str.totalVolumeUseFlag
call fcn.00405860
cmp eax, 0xffffffff
je 0x401814
add eax, 1
jns 0x4017f1
xor eax, eax
jmp 0x401806
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x401800
xor eax, eax
jmp 0x401806
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x428f1c], eax
mov ecx, dword [0x424c34]
sub esp, 0xc
push str.totalVolumePrintFlag
call fcn.00405860
cmp eax, 0xffffffff
je 0x401858
add eax, 1
jns 0x401835
xor eax, eax
jmp 0x40184a
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x401844
xor eax, eax
jmp 0x40184a
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
add esp, 4
mov dword [0x422960], eax
mov ecx, dword [0x424c34]
sub esp, 0xc
mov dword [0x428ddc], 0x422924
push str.taikenFlag
call fcn.00405860
cmp eax, 0xffffffff
je 0x4018ab
add eax, 1
jns 0x401883
xor eax, eax
jmp 0x401898
mov ecx, dword [0x424c34]
cmp eax, dword [ecx + 8]
jl 0x401892
xor eax, eax
jmp 0x401898
shl eax, 7
add eax, dword [ecx + 0xc]
push eax
call fcn.0040a735
mov ecx, eax
add esp, 4
mov dword [0x424cd4], ecx
jmp 0x4018b1
mov ecx, dword [0x424cd4]
test ecx, ecx
mov eax, str.tsysfile2
push 0x40000
cmove eax, dword [0x428ddc]
mov dword [0x428ddc], eax
call fcn.00406096
mov dword [0x428f10], eax
call fcn.00405280
push dword [0x428ddc]
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0x30]
push 0x422970
push str._s_s.sav
push eax
call ebx
push 0x41f8d4
lea eax, [esp + 0x40]
mov dword [esp + 0x3c], 0
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040a41b
mov eax, dword [esp + 0x44]
add esp, 0x20
test eax, eax
jne 0x401a4a
push dword [0x428ddc]
lea eax, [esp + 0x2c]
push str.sav_s.org
push eax
call ebx
push 0x41f8d4
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0040a41b
mov eax, dword [esp + 0x3c]
add esp, 0x18
test eax, eax
jne 0x401a4a
mov dword [0x424d3c], 1
call fcn.00405280
cmp dword [0x4228c8], 1
lea eax, [esp + 0x128]
push dword [0x428ddc]
push 0x422970
je 0x401984
push 0x41f804
jmp 0x401989
push str.not_found_:__s_s.sav
push eax
call ebx
add esp, 0x10
lea eax, [esp + 0x128]
push 0
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4019b5
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x428f10]
test eax, eax
je 0x4019d1
push eax
call fcn.00405e58
add esp, 4
mov dword [0x428f10], 0
mov esi, dword [0x424c34]
test esi, esi
je 0x401a1c
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401a06
push eax
call fcn.00405e58
mov dword [esi + 0xc], 0
add esp, 4
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov esi, dword [0x424c34]
test esi, esi
je 0x401a12
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov dword [0x424c34], 0
cmp byte [0x42d258], 0
je 0x401a2e
push 0x42d258
call dword [esp + 0x24]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1038]
xor ecx, esp
call fcn.00405e47
mov esp, ebp
pop ebp
ret 0x10
push eax
push 0x40000
push 1
push dword [0x428f10]
call fcn.0040a93e
push dword [esp + 0x34]
mov dword [0x424d84], eax
call fcn.0040833b
mov eax, dword [0x428f10]
mov ecx, 1
add eax, 0x40
add esp, 0x14
mov dword [0x428dd0], eax
mov edx, dword [eax + 0x20]
cmp edx, ecx
jle 0x401a9b
cmp dword [eax + 4], 0x11
je 0x401a96
add eax, dword [eax]
inc ecx
cmp ecx, edx
jl 0x401a87
jmp 0x401a9b
mov dword [0x424ce4], eax
call fcn.004045f0
mov edx, str.configWindowButtonFlag
mov ecx, 0x42295c
call fcn.00404e40
mov edx, str.configFullScreenButtonFlag
mov ecx, 0x422918
call fcn.00404e40
mov edx, str.movieVolumeNotUse
mov ecx, 0x42cf3c
call fcn.00404e40
mov edx, str.soundVoiceVolumeNotUse
mov ecx, 0x422948
call fcn.00404e40
mov edx, str.select2D3D
mov ecx, 0x428de0
call fcn.00404e40
mov ecx, dword [0x428e78]
sub esp, 0xc
mov dword [0x42cf48], 0x422900
push str.fontSampleText
call fcn.00405860
cmp eax, 0xffffffff
je 0x401b30
add eax, 1
jns 0x401b16
xor eax, eax
jmp 0x401b2b
mov ecx, dword [0x428e78]
cmp eax, dword [ecx + 8]
jl 0x401b25
xor eax, eax
jmp 0x401b2b
shl eax, 7
add eax, dword [ecx + 0xc]
mov dword [0x42cf48], eax
mov edx, str.fontSampleSize
mov ecx, 0x422930
call fcn.00404ea0
call fcn.004045f0
cmp byte [0x424cc8], 0
je 0x401b6a
cmp dword [0x428efc], 0
je 0x401b6a
mov eax, dword [0x424d78]
mov dword [0x424c30], eax
mov eax, dword [0x4228e4]
mov dword [0x4228c0], eax
push 0
push 0x401fb0
push 0
push 0x67
push dword [esp + 0x24]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
test eax, eax
jne 0x401ec2
mov esi, dword [0x428dd0]
mov edi, 0x42d158
mov eax, dword [0x428df0]
test eax, eax
mov ebx, dword [0x428f04]
mov dword [esp + 0x14], eax
mov eax, 1
cmovne ebx, eax
lea ecx, [esi + 0x100]
mov eax, dword [0x428dd4]
lea edx, [edi + 1]
mov dword [esi + 0x54], eax
mov eax, dword [0x428dec]
mov dword [esi + 0x8c], eax
mov eax, dword [0x424d30]
mov dword [esi + 0x94], eax
mov eax, dword [0x424c2c]
mov dword [0x428f04], ebx
mov dword [esi + 0x9c], eax
mov al, byte [edi]
inc edi
test al, al
jne 0x401be3
sub edi, edx
mov eax, 0xfe
cmp edi, eax
cmovg edi, eax
push edi
push 0x42d158
push ecx
call fcn.00407d50
mov eax, dword [0x424d54]
add esp, 0xc
mov ecx, dword [0x424ce4]
mov word [edi + esi + 0x100], 0
mov dword [esi + 0x98], eax
mov eax, dword [0x424d74]
mov dword [esi + 0xac], eax
mov eax, dword [0x422950]
mov dword [esi + 0xb0], eax
mov eax, dword [0x4228f4]
mov dword [esi + 0xb8], eax
mov eax, dword [0x4228c4]
mov dword [esi + 0xb4], eax
mov eax, dword [0x422908]
mov dword [esi + 0xbc], eax
mov eax, dword [0x4228f8]
mov dword [esi + 0xd4], eax
mov eax, dword [0x422958]
mov dword [esi + 0x7b0], eax
mov eax, dword [0x42293c]
mov dword [esi + 0x88], eax
test ecx, ecx
je 0x401c8c
mov eax, dword [0x4228e0]
mov dword [ecx + 0x30], eax
mov eax, dword [0x424cec]
mov dword [ecx + 0x24], eax
mov eax, dword [0x422940]
mov dword [esi + 0xc0], eax
mov eax, dword [0x42290c]
mov dword [esi + 0xc8], eax
mov eax, dword [0x422934]
mov dword [esi + 0xc4], eax
mov eax, dword [0x422968]
mov dword [esi + 0xcc], eax
mov eax, dword [0x42291c]
mov dword [esi + 0xd8], eax
mov eax, dword [0x422914]
mov dword [esi + 0x7b4], eax
test ecx, ecx
je 0x401cda
mov eax, dword [0x422910]
mov dword [ecx + 0x34], eax
cmp dword [0x424c84], 0
mov eax, dword [0x428ea8]
movups xmm0, xmmword [0x428eb8]
mov dword [esi + 0x790], eax
mov eax, dword [0x428ea4]
mov dword [esi + 0x794], eax
mov eax, dword [0x428f08]
mov dword [esi + 0x798], eax
mov eax, dword [0x424d38]
mov dword [esi + 0x79c], eax
mov dword [esi + 0x7a8], ebx
movups xmmword [esi + 0x740], xmm0
mov eax, dword [0x424d58]
movups xmm0, xmmword [0x428ec8]
movups xmmword [esi + 0x750], xmm0
movups xmm0, xmmword [0x428ed8]
movups xmmword [esi + 0x760], xmm0
movups xmm0, xmmword [0x428ee8]
movups xmmword [esi + 0x770], xmm0
movups xmm0, xmmword [0x424c40]
movups xmmword [esi + 0x700], xmm0
movups xmm0, xmmword [0x424c50]
movups xmmword [esi + 0x710], xmm0
movups xmm0, xmmword [0x424c60]
movups xmmword [esi + 0x720], xmm0
movups xmm0, xmmword [0x424c70]
movups xmmword [esi + 0x730], xmm0
mov dword [esi + 0x7b8], eax
je 0x401d99
or dword [esi + 0x7bc], 1
jmp 0x401da0
and dword [esi + 0x7bc], 0xfffffffe
mov ecx, dword [esi + 0x7bc]
mov eax, ecx
or eax, 2
and ecx, 0xfffffffd
cmp dword [0x428efc], 0
cmovne ecx, eax
mov dword [esi + 0x7bc], ecx
mov eax, ecx
or eax, 4
and ecx, 0xfffffffb
cmp dword [esp + 0x14], 0
cmovne ecx, eax
mov dword [esi + 0x7bc], ecx
cmp dword [0x424d3c], 1
jne 0x401e5b
cmp dword [0x424c24], 0
je 0x401e5b
cmp byte [0x42db60], 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
je 0x401e16
call fcn.00405280
push 0
push 0x42d360
call esi
mov edi, dword [esp + 0x10]
test eax, eax
jne 0x401e1a
call edi
cmp eax, 0xb7
jne 0x401e5b
jmp 0x401e1a
mov edi, dword [esp + 0x10]
cmp byte [0x42d760], 0
je 0x401e3e
call fcn.00405280
push 0
push 0x42df60
call esi
test eax, eax
jne 0x401e3e
call edi
cmp eax, 0xb7
jne 0x401e5b
cmp byte [0x422d70], 0
je 0x401e5b
call fcn.00405280
push 0
push 0x422970
call esi
test eax, eax
jne 0x401e5b
call edi
call fcn.00405280
push dword [0x428ddc]
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push 0x422970
push str._s_s.sav
push eax
call esi
push 0x41f8e4
lea eax, [esp + 0x3c]
mov dword [esp + 0x38], 0
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040a41b
mov eax, dword [esp + 0x40]
add esp, 0x1c
test eax, eax
je 0x401ec2
push eax
push dword [0x424d84]
push 1
push dword [0x428f10]
call fcn.0040a301
push dword [esp + 0x34]
call fcn.0040833b
add esp, 0x14
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x401ed1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x428f10]
test eax, eax
je 0x401eed
push eax
call fcn.00405e58
add esp, 4
mov dword [0x428f10], 0
mov esi, dword [0x428e78]
test esi, esi
je 0x401f38
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401f22
push eax
call fcn.00405e58
mov dword [esi + 0xc], 0
add esp, 4
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov esi, dword [0x428e78]
test esi, esi
je 0x401f2e
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov dword [0x428e78], 0
mov esi, dword [0x424c34]
test esi, esi
je 0x401f83
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401f6d
push eax
call fcn.00405e58
mov dword [esi + 0xc], 0
add esp, 4
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov esi, dword [0x424c34]
test esi, esi
je 0x401f79
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov dword [0x424c34], 0
cmp byte [0x42d258], 0
je 0x401f95
push 0x42d258
call dword [esp + 0x24]
mov ecx, dword [esp + 0x1044]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405e47
mov esp, ebp
pop ebp
ret 0x10