Function at 0x408f20
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x59d274
mov eax, dword fs:[0]
push eax
sub esp, 0x138
push ebx
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
mov ecx, str.ksgamebox.dll
mov dword [esp + 0x14], ebx
call fcn.00481430
lea ecx, [esp + 0x10]
push ecx
lea esi, [esp + 0x18]
mov dword [esp + 0x154], ebx
call fcn.00473ba0
add esp, 4
mov byte [esp + 0x150], 2
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408fa9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40907f
call fcn.0047f920
test eax, eax
mov byte [esp + 0x150], 3
je 0x409016
mov eax, dword [eax + 0x24]
cmp eax, 4
jg 0x409016
push 4
push str.KDoyoManager::_GetDoyoManager
push 0x133
push str.e:kingsoft_duba_build_build_srckisenginekis_2016_released_sp5.5_1339_fbkis_srckvip_srckybox3rd_doyo_doyo.h
lea ecx, [esp + 0x2c]
push ecx
call fcn.0047f220
push 0x5ab160
mov byte [esp + 0x154], 4
mov ebx, 1
push eax
mov dword [esp + 0x18], ebx
call fcn.0047f6e0
push esi
push eax
call fcn.0047f6e0
add esp, 0x10
test bl, 1
mov dword [esp + 0x150], 3
je 0x409030
lea edx, [esp + 0x1c]
push edx
call fcn.0047eb40
mov eax, dword [0x5f9180]
test eax, eax
je 0x409040
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [esi - 0x10]
mov dword [esp + 0x150], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409067
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
mov dword [edi + 8], eax
jne 0x409196
call fcn.0047f920
test eax, eax
mov byte [esp + 0x150], 5
je 0x40914f
cmp dword [eax + 0x24], 4
jg 0x40914f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x9c]
push ecx
mov dword [esp + 0x1c], eax
call fcn.0041c690
mov esi, eax
push 4
push str.KDoyoManager::_GetDoyoManager
push 0x13a
push str.e:kingsoft_duba_build_build_srckisenginekis_2016_released_sp5.5_1339_fbkis_srckvip_srckybox3rd_doyo_doyo.h
lea edx, [esp + 0x2c]
mov byte [esp + 0x160], 6
push edx
mov dword [esp + 0x24], 2
call fcn.0047f220
mov edi, eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x154], 7
mov ebx, 6
mov eax, esi
mov dword [esp + 0x14], ebx
call fcn.0041f020
add esp, 4
push str.__path
push ecx
push 0x5ab1c8
push edi
mov esi, eax
call fcn.0047f6e0
push eax
mov ecx, esi
call fcn.005382c0
add esp, 0x10
push eax
call fcn.0047e680
mov ecx, dword [esp + 0x1c]
push ecx
push eax
call fcn.0047f6e0
mov esi, dword [esp + 0x24]
add esp, 0x10
test bl, 4
mov dword [esp + 0x150], 6
je 0x409170
lea edx, [esp + 0x1c]
and ebx, 0xfffffffb
push edx
mov dword [esp + 0x14], ebx
call fcn.0047eb40
test bl, 2
mov dword [esp + 0x150], 5
je 0x409030
lea eax, [esp + 0x9c]
push eax
call fcn.00404170
jmp 0x409030
push 1
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x409294
call fcn.0047f920
test eax, eax
mov byte [esp + 0x150], 8
je 0x40924d
mov eax, dword [eax + 0x24]
cmp eax, 4
jg 0x40924d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x9c]
push ecx
mov dword [esp + 0x1c], eax
call fcn.0041c690
mov esi, eax
push 4
push str.KDoyoManager::_GetDoyoManager
push 0x141
push str.e:kingsoft_duba_build_build_srckisenginekis_2016_released_sp5.5_1339_fbkis_srckvip_srckybox3rd_doyo_doyo.h
lea edx, [esp + 0x2c]
mov byte [esp + 0x160], 9
push edx
mov dword [esp + 0x24], 8
call fcn.0047f220
mov edi, eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x154], 0xa
mov ebx, 0x18
mov eax, esi
mov dword [esp + 0x14], ebx
call fcn.0041f020
add esp, 4
push str._jWW
push edi
mov esi, eax
call fcn.0047f6e0
push eax
mov ecx, esi
call fcn.005382c0
mov esi, dword [esp + 0x20]
add esp, 0xc
test bl, 0x10
mov dword [esp + 0x150], 9
je 0x40926e
lea ecx, [esp + 0x1c]
and ebx, 0xffffffef
push ecx
mov dword [esp + 0x14], ebx
call fcn.0047eb40
test bl, 8
mov dword [esp + 0x150], 8
je 0x409030
lea edx, [esp + 0x9c]
push edx
call fcn.00404170
jmp 0x409030
call eax
xor ecx, ecx
test eax, eax
setne cl
mov dword [edi + 0xc], eax
lea eax, [esi - 0x10]
mov dword [esp + 0x150], 0xffffffff
lea edx, [eax + 0xc]
mov edi, ecx
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4092c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret