Function at 0x406cb0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x581c38
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x5b107c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.MSVCR100.dll_srand]
add esp, 4
call fcn.00560d50
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edi, 1
cmp dword [0x6573f0], edi
je 0x406d10
mov eax, dword [0x6573ac]
push eax
call esi
mov dword [0x6573f0], edi
call fcn.0052d310
xor edi, edi
cmp dword [0x6573f0], edi
je 0x406d2e
mov ecx, dword [0x6573a8]
push ecx
call esi
mov dword [0x6573f0], edi
push 0x10
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
cmp eax, edi
je 0x406d50
mov esi, eax
mov dword [eax], vtable.CEngine.0
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov dword [ebp - 0x10], esi
jmp 0x406d55
mov dword [ebp - 0x10], edi
mov esi, edi
mov edx, dword [0x6981b4]
mov dword [0x65fb2c], esi
push 0x10
mov dword [ebp - 0x14], edx
mov dword [esi + 4], ebx
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov ecx, eax
add esp, 4
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], edi
cmp ecx, edi
je 0x406d99
mov eax, dword [ebp - 0x14]
fldz
push eax
push ecx
mov eax, 0x698194
fstp dword [esp]
mov esi, ecx
call fcn.00546cc0
mov esi, dword [ebp - 0x10]
jmp 0x406d9b
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 8], eax
mov dword [esi + 0xc], edi
mov dword [0x65faf0], edi
call fcn.00429a90
push 0x67cb10
call fcn.00433a70
mov eax, ebx
call fcn.0052c030
call fcn.00436730
push 0x586598
push str..Resource_string.mhs
mov dword [0x65fa08], ebx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
cmp eax, edi
je 0x406dec
push eax
call fcn.00529100
call fcn.004ca230
call fcn.004c9e00
test eax, eax
jne 0x406dff
call fcn.004ca230
mov edx, dword [0x64f5b0]
xor ecx, ecx
mov ebx, 1
mov dword [0x64f5e0], edi
mov word [0x64f5e4], cx
mov dword [0x64f5e8], ebx
mov dword [0x69aa48], edx
call fcn.004c9f10
call fcn.004c52b0
call fcn.0044df10
call fcn.0044fc00
call fcn.0044fed0
call fcn.004d41f0
call fcn.004e2d60
push 0x65f950
mov dword [0x69aa44], edi
call dword [sym.imp.SoundLib.dll_CreateSoundLib]
add esp, 4
cmp eax, edi
je 0x406e65
call fcn.0054b400
call fcn.00554340
call fcn.0052bcb0
call fcn.00406b50
mov esi, eax
call fcn.004f4ba0
mov dword [0x6568ec], ebx
mov dword [0x6568f0], edi
mov dword [0x6568f4], 0xea60
mov dword [0x6568f8], edi
mov dword [0x6568fc], edi
mov dword [0x656900], 0xffffffff
mov dword [0x656904], edi
call fcn.004fef60
call fcn.004fec30
push 0x50
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
add esp, 4
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], ebx
cmp esi, edi
je 0x406ef1
push 0xa
lea ecx, [esi + 4]
call fcn.00574250
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x48], edi
mov dword [esi], edi
jmp 0x406ef3
xor esi, esi
mov dword [ebp - 4], 0xffffffff
mov dword [0x65faf8], esi
call fcn.0054aec0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret