Function at 0x416050
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [ebp + 8]
sub esp, 0x924
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ecx + 0xa88], edx
cmp eax, ebx
je 0x416078
mov byte [esp + 0xf], 1
cmp word [eax], bx
je 0x41607c
mov byte [esp + 0xf], bl
cmp eax, ebx
je 0x4160e5
cmp word [eax], bx
je 0x4160e5
push eax
push str.Critical_Error:__s_n_nThe_program_will_exit.
mov esi, 0x400
lea edi, [esp + 0x138]
call fcn.00473990
mov eax, dword [0x4c90f4]
mov edx, dword [0x4c64b8]
add esp, 8
push 0x10000
push eax
mov ecx, edi
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [0x4c64b8]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4160de
mov ecx, dword [0x4c64b8]
push ecx
mov byte [0x4c64b4], 1
call dword [sym.imp.USER32.dll_DestroyWindow]
push 2
call fcn.0040a0c0
cmp byte [0x4c930f], bl
jne 0x41628a
cmp byte [ecx + 0xacc], bl
je 0x41628a
mov esi, dword [0x4c6cb4]
mov edx, dword [ebp + 0xc]
mov dword [0x4c9e54], edx
cmp byte [esi + 0x17], bl
jne 0x416114
mov esi, dword [esi + 0xc]
test byte [esi + 0x15], 8
je 0x416121
mov eax, esi
call fcn.00401160
mov al, byte [esi + 0x17]
cmp al, 1
jne 0x41613a
test byte [esi + 0x15], 4
je 0x416135
mov eax, esi
call fcn.0042e850
mov eax, dword [esi + 8]
jmp 0x41614a
cmp al, 2
jne 0x416145
call fcn.00401000
jmp 0x41614a
mov eax, 0x4c85b8
push 0x7f
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0048fac4
mov eax, dword [0x4c28ec]
inc dword [0x4c6624]
xor ecx, ecx
add eax, 0x108
mov word [esp + 0x13a], cx
mov edi, eax
mov ecx, 0x42
mov esi, 0x4c50f0
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov dword [0x4c28ec], eax
mov dword [eax + 0x2c], ebx
push ebx
mov eax, 0x4c8640
call fcn.00415ce0
mov dword [0x4c9110], ebx
mov dword [0x4c9114], ebx
cmp dword [0x4c6654], ebx
je 0x4161b4
push 0x4c6cb8
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0xa7c]
mov edi, dword [0x4c28b4]
mov dword [0x4c28b4], ebx
mov byte [0x4c930f], 1
mov byte [esp + 0xe], 1
mov byte [0x4c3e63], bl
cmp ecx, ebx
je 0x4161f4
call fcn.00401220
test eax, eax
je 0x4161f4
cmp byte [0x4c3e63], bl
jne 0x4161f4
mov byte [esp + 0xe], bl
mov byte [0x4c3e63], 1
cmp byte [esp + 0xe], bl
je 0x41624d
mov dword [esp + 0x18], ebx
call fcn.004443a0
mov dword [esp + 0x10], eax
mov eax, dword [0x4c9e54]
cdq
mov dword [esp + 0x24], edx
xor edx, edx
cmp dword [esi + 0xa7c], ebx
mov dword [esp + 0x20], eax
sete dl
lea eax, [esp + 0x10]
lea ebx, [esi + 0xa58]
mov dword [esp + 0x28], 1
push edx
push 2
push eax
call fcn.0046eec0
xor ebx, ebx
cmp eax, 3
jne 0x41624d
mov byte [esp + 0xe], bl
mov byte [0x4c930f], bl
cmp byte [esp + 0xe], bl
jne 0x416280
cmp byte [esp + 0xf], bl
jne 0x416280
lea ecx, [esp + 0x30]
push ecx
call fcn.00403620
add esp, 4
mov dword [0x4c28b4], edi
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 0xc]
push edx
push esi
call fcn.004162d0
cmp byte [0x4c3e63], bl
jne 0x4162bf
cmp edx, 9
jne 0x4162bf
mov eax, dword [0x4c6458]
cmp word [eax], bx
je 0x4162aa
mov ecx, dword [ebp + 0xc]
mov dword [0x4c9e54], ecx
pop edi
pop esi
mov byte [0x4c3e63], 1
mov eax, 8
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 0xc]
push edx
push ecx
call fcn.004162d0
int3