Function at 0x489120
Capabilities:
Check if file exists
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x4b0214
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x4dffd0]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4dffd0]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov eax, dword [esp + 0xc8]
mov edi, ecx
push 0x23
lea ecx, [esp + 0x64]
push ecx
mov ecx, edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], 1
call fcn.00488a00
xor esi, esi
mov ebp, 0x10
cmp dword [eax + 0x18], ebp
mov dword [esp + 0xc0], esi
jb 0x48919a
mov eax, dword [eax + 4]
jmp 0x48919d
add eax, 4
push eax
lea edx, [esp + 0x9c]
push str._sKingsoftksearch
push edx
call fcn.0044a0b0
add esp, 0xc
lea ecx, [esp + 0x60]
mov byte [esp + 0xc0], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [esp + 0xb0], ebp
mov eax, dword [esp + 0x9c]
jae 0x4891dc
lea eax, [esp + 0x9c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x489213
cmp dword [esp + 0xb0], ebp
mov eax, dword [esp + 0x9c]
jae 0x4891fe
lea eax, [esp + 0x9c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x489213
mov dword [esp + 0x14], esi
jmp 0x4894b3
lea eax, [edi + 0x864]
push eax
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [edi + 0xdc]
lea ecx, [edi + 0x6c0]
lea edx, [edi + 0xc]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x20]
cmp dword [eax], 0xffffffff
je 0x489489
push 0x23
lea ecx, [esp + 0x48]
push ecx
mov ecx, edi
call fcn.00488a00
cmp dword [eax + 0x18], ebp
mov byte [esp + 0xc0], 3
jb 0x489270
mov eax, dword [eax + 4]
jmp 0x489273
add eax, 4
lea edx, [esi + 0x41]
push edx
push eax
lea eax, [esp + 0x84]
push str._sKingsoftksearch_cSearchLoc.db
push eax
call fcn.0044a0b0
add esp, 0x10
lea ecx, [esp + 0x44]
mov byte [esp + 0xc0], 5
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [esp + 0x94], ebp
mov eax, dword [esp + 0x80]
jae 0x4892b6
lea eax, [esp + 0x80]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 0xffffffff
jne 0x48930a
mov ecx, dword [esp + 0x2c]
mov dword [ecx + esi*4], 1
lea ecx, [esp + 0x7c]
mov dword [esp + 0x14], 0
mov byte [esp + 0xc0], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x489482
mov ecx, dword [esp + 0x1c]
call fcn.004877b0
push 0
mov esi, eax
lea edi, [esi + 0x1c]
push edi
push 0
push 4
push 0
push ebx
mov dword [esp + 0x50], edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x40], ebp
jne 0x489360
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x7c]
mov dword [edx + eax*4], 1
mov dword [esp + 0x14], ebp
mov byte [esp + 0xc0], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x489466
push 0
push 0
push 0
push 2
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
jne 0x48939f
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov dword [ecx + edx*4], 1
lea ecx, [esp + 0x7c]
mov dword [esp + 0x14], eax
mov byte [esp + 0xc0], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x489457
mov ecx, dword [esp + 0x1c]
mov dword [ebx], 0x2712
mov dword [ebx + 4], esi
mov eax, dword [ecx + 8]
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x24]
mov edx, dword [eax + 0xd0]
mov dword [ebx + 0xc], edx
mov edx, dword [eax + 0xd4]
mov dword [ebx + 0x10], edx
mov edx, dword [eax]
mov dword [ebx + 0x14], edx
mov eax, dword [eax + 4]
mov dword [ebx + 0x18], eax
mov ecx, dword [ecx]
mov ebp, dword [ecx + 4]
test ebp, ebp
lea edx, [ebx + 0x1c]
je 0x489422
jmp 0x4893e5
mov edx, dword [esp + 0x28]
mov esi, dword [ebp]
mov edi, edx
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [ebp]
mov ecx, dword [eax + 5]
mov eax, dword [eax + 1]
push ecx
add edx, 0x1d
push eax
push edx
mov dword [esp + 0x34], edx
call sub.MSVCR80.dll_memcpy
mov ecx, dword [ebp]
mov edx, dword [ecx + 5]
mov ebp, dword [ebp + 4]
add dword [esp + 0x34], edx
add esp, 0xc
test ebp, ebp
jne 0x4893e1
mov edi, dword [esp + 0x38]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov esi, dword [esp + 0x30]
push 0
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea ecx, [esp + 0x7c]
mov byte [esp + 0xc0], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ebp, dword [esp + 0x40]
test ebx, ebx
je 0x489462
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ebx, dword [esp + 0x30]
test ebp, ebp
je 0x489471
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x18]
mov ebp, 0x10
je 0x489489
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add dword [esp + 0x24], 8
add dword [esp + 0x20], 4
add dword [esp + 0x1c], 0x24
add esi, 1
cmp esi, 0x1a
mov dword [esp + 0x18], esi
jl 0x489243
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [esp + 0x98]
mov dword [esp + 0xc0], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.0048e5b2
add esp, 0xb0
ret 4