Function at 0x4184d0
Capabilities:
Set current directory

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
xor ebx, ebx
mov esi, eax
push edi
mov byte [0x4cc790], 1
mov word [0x4ccffc], bx
cmp esi, ebx
jne 0x4184f3
mov esi, dword [0x4ccfe0]
cmp dword [0x4cc494], ebx
jne 0x418509
call fcn.004746b0
mov dword [0x4cc494], eax
cmp eax, ebx
je 0x418555
mov ecx, dword [0x4cc498]
cmp dword [ecx + 8], 0x14
jae 0x418527
call fcn.004746b0
mov ecx, dword [0x4cc498]
mov dword [ecx + 0xc], eax
cmp eax, ebx
je 0x418555
mov eax, dword [ecx + 4]
add dword [ecx + 8], 0xffffffec
lea edx, [eax + 0x14]
mov dword [0x4cc49c], eax
mov dword [ecx + 4], edx
cmp eax, ebx
je 0x418555
mov dword [eax], vtable.Label.0
mov dword [eax + 4], 0x4a48a0
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x418557
xor eax, eax
mov dword [0x4ccb50], eax
cmp eax, ebx
je 0x418771
cmp dword [0x4ccff8], 2
mov eax, 0x4a9684
je 0x418574
mov eax, esi
mov edi, dword [0x4cc478]
push eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], ebx
call fcn.004188e0
mov ebp, dword [esp + 0x10]
mov esi, eax
cmp esi, 3
jne 0x41859d
push edi
push ebp
call fcn.004189b0
mov esi, eax
mov edi, 1
cmp ebp, ebx
je 0x4185b0
mov edx, dword [ebp]
mov eax, dword [edx]
push edi
mov ecx, ebp
call eax
cmp esi, edi
jne 0x418771
push ebx
push ebx
push ebx
push 0x68
push 0x4cc518
call fcn.0041eef0
test eax, eax
je 0x418771
mov ecx, dword [0x4cc51c]
mov dword [ecx + 0xc], edi
mov eax, dword [0x4cc518]
call fcn.00424610
test eax, eax
je 0x418771
mov eax, dword [0x4cc518]
call fcn.004246c0
cmp dword [0x4cc520], ebx
je 0x418623
mov eax, dword [0x4cc518]
mov edx, dword [0x4cc524]
mov dword [edx + 0x14], eax
mov ecx, dword [0x4cc518]
mov edx, dword [0x4cc524]
mov dword [ecx + 0x10], edx
mov eax, dword [0x4cc520]
mov dword [0x4cc518], eax
xor ebp, ebp
cmp dword [0x4cc534], ebx
jle 0x41866a
lea ecx, [ecx]
mov ecx, dword [0x4cc530]
mov edi, dword [ecx + ebp*4]
cmp byte [edi + 0x3d], bl
jne 0x41865c
test byte [edi + 0x3c], 4
jne 0x41865c
mov eax, dword [edi + 0x1c]
lea esi, [edi + 0x28]
push edi
call fcn.004313b0
mov eax, dword [edi + 0x20]
lea esi, [edi + 0x30]
push edi
call fcn.004313b0
inc ebp
cmp ebp, dword [0x4cc534]
jl 0x418630
mov edi, 1
cmp dword [0x4cc77c], ebx
je 0x418692
call fcn.00421fe0
test eax, eax
je 0x418771
mov eax, dword [0x4cc77c]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [0x4cc77c], ebx
cmp dword [0x4cb6a8], ebx
je 0x41869f
call fcn.00431450
mov ecx, dword [0x4cbd68]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
add dword [0x4cc78c], edi
push ebx
push ebx
push ebx
push 0x68
push 0x4cc518
call fcn.0041eef0
test eax, eax
je 0x418771
push ebx
push ebx
push ebx
push 0x68
push 0x4cc518
call fcn.0041eef0
test eax, eax
je 0x418771
mov edx, dword [0x4cc51c]
mov eax, dword [edx + 0x10]
mov dword [eax + 0xc], edi
mov ecx, dword [0x4cc51c]
mov dword [ecx + 0xc], edi
mov edx, dword [0x4ccb50]
mov eax, dword [0x4cc51c]
push ebx
push ebx
mov dword [edx + 8], eax
mov ecx, dword [0x4cc518]
push ebx
push ecx
mov ecx, 0x4cc518
call fcn.00424730
test eax, eax
je 0x418771
mov eax, dword [0x4cc518]
call fcn.00424b50
test eax, eax
je 0x418771
push 3
push ebx
push 0x4a9688
mov ecx, 0x4cc518
call fcn.00423c00
mov dword [0x4cbd60], eax
cmp eax, ebx
je 0x418771
push edi
push ebx
push 0xffffffffffffffff
push 0x4a4930
push eax
call fcn.0047a5f0
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x10]
call fcn.00414e70
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xc
ret