Function at 0x485040
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5b107c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x284]
mov edx, dword [eax + 4]
push esi
push edi
lea edi, [ebx + 0x284]
mov ecx, edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], edi
call edx
movzx eax, word [ebx + 0x354]
lea eax, [eax + eax*8]
movzx esi, word [eax*4 + 0x6854c4]
lea eax, [eax*4 + 0x6854b0]
mov dword [ebp - 0x20], eax
call fcn.005365e0
cmp dword [edi + 0x14], 0
mov esi, eax
mov dword [edi + 0x2c], 0
jne 0x4850a5
mov dword [edi + 0x24], 1
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov ecx, edi
call edx
mov dword [edi + 0x10], ebx
mov byte [edi + 0x28], 0
mov dword [edi + 0x18], 0
mov dword [ebx + 4], 2
mov ebx, 9
cmp dword [0x6573f0], ebx
je 0x4850e2
mov eax, dword [0x6573cc]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], ebx
mov eax, dword [0x65fadc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x188]
push esi
push eax
call edx
push edi
xor ecx, ecx
mov ebx, esi
call fcn.0054af90
mov dword [ebp - 0x14], eax
mov dword [edi + 0x14], eax
test eax, eax
jne 0x485162
push 0x5948e0
push str.._Log_MissedObjectList.txt
call dword [sym.imp.MSVCR100.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x48513a
push esi
push 0x596998
push ebx
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
cmp dword [0x6573f0], 0
je 0x4851f2
mov eax, dword [0x6573a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], 0
jmp 0x4851f2
call fcn.00549110
test eax, eax
jne 0x485178
mov edx, dword [ebp - 0x14]
mov edi, esi
call fcn.00549280
mov edi, dword [ebp - 0x18]
mov dword [edi + 0x3c], eax
cmp dword [0x6573f0], 0
je 0x48519b
mov ecx, dword [0x6573a8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [0x6573f0], 0
cmp dword [edi + 0x24], 0xffffffff
jne 0x4851af
push 1
mov ecx, 1
mov esi, edi
call fcn.0054a4a0
cmp dword [edi + 0x14], 0
je 0x4851f2
mov ecx, dword [edi + 0x24]
mov edx, dword [edi + 0x3c]
call fcn.00548ff0
mov ecx, dword [0x65fadc]
mov dword [edi + 0x38], eax
movzx eax, word [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edi + 0x14]
push eax
push ecx
mov ecx, dword [edx + 0x44]
call ecx
mov ecx, dword [edi + 0x38]
movzx ecx, word [ecx + 2]
mov eax, dword [0x65fadc]
mov edx, dword [eax]
mov edx, dword [edx + 0x40]
push ecx
mov ecx, dword [edi + 0x14]
push ecx
push eax
call edx
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi]
mov edx, dword [eax + 0x84]
lea ecx, [esi + 0x14c]
push ecx
mov ecx, esi
call edx
mov eax, dword [edi + 0x14]
mov ebx, 1
test eax, eax
je 0x485232
cmp dword [0x65fae8], 0
mov dword [edi + 0xc], ebx
jne 0x485232
mov ecx, dword [0x65fadc]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x98]
push ecx
call eax
fld dword [esi + 0x24c]
mov edx, dword [esi]
fdiv qword [0x598de0]
mov eax, dword [edx + 0x8c]
push ecx
mov ecx, esi
fmul qword [0x598dd8]
fstp dword [ebp - 0x14]
fld dword [ebp - 0x14]
fstp dword [esp]
call eax
cmp dword [edi + 0x14], 0
je 0x4852ab
cmp dword [edi + 0x24], ebx
je 0x4852a8
mov edx, dword [edi + 0x3c]
mov ecx, ebx
mov dword [edi + 0x24], ebx
call fcn.00548ff0
mov ecx, dword [0x65fadc]
mov dword [edi + 0x38], eax
movzx eax, word [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edi + 0x14]
push eax
push ecx
mov ecx, dword [edx + 0x44]
call ecx
mov ecx, dword [edi + 0x38]
movzx ecx, word [ecx + 2]
mov eax, dword [0x65fadc]
mov edx, dword [eax]
mov edx, dword [edx + 0x40]
push ecx
mov ecx, dword [edi + 0x14]
push ecx
push eax
call edx
mov byte [edi + 0x28], 0
mov dword [edi + 0x1c], ebx
call fcn.0054ab60
mov eax, esi
cmp word [eax + 0x35c], 0
jne 0x4852c4
mov ecx, dword [ebp - 0x18]
call fcn.0054a8f0
mov ecx, dword [ebp - 0x20]
fld dword [ecx + 0x18]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x14]
fstp dword [ebp - 8]
fld dword [ebp - 8]
fst dword [ebp - 0xc]
fstp dword [ebp - 0x10]
test eax, eax
je 0x4852f6
mov ecx, dword [0x65fadc]
mov edx, dword [ecx]
lea esi, [ebp - 0x10]
push esi
push eax
mov eax, dword [edx + 0x8c]
push ecx
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005762ee
mov esp, ebp
pop ebp
ret