Function at 0x41e040
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4f4
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [esi + 0x300], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [esp + 0x14], esi
je 0x41e071
cmp byte [eax], 0
mov byte [esp + 0x12], 1
je 0x41e076
mov byte [esp + 0x12], 0
cmp eax, ebx
je 0x41e0e9
cmp byte [eax], 0
je 0x41e0e9
push eax
push str.Critical_Error:__s_n_nThe_program_will_exit.
lea ecx, [esp + 0x108]
push 0x400
push ecx
call fcn.0043c2b0
mov edx, dword [0x45eefc]
mov ecx, dword [0x45d6e8]
add esp, 0x10
push 0x10000
push edx
lea eax, [esp + 0x108]
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [0x45d6e8]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x41e0df
mov eax, dword [0x45d6e8]
push eax
mov byte [0x45d6e4], 1
call dword [sym.imp.USER32.dll_DestroyWindow]
push 2
call fcn.00409770
add esp, 4
cmp dword [esi + 0x2fc], ebx
je 0x41e0fa
mov al, byte [0x4612b6]
test al, al
je 0x41e12b
mov ecx, dword [0x45d6e8]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x41e11f
mov edx, dword [0x45d6e8]
push edx
mov byte [0x45d6e4], 1
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp + 0x10]
push eax
call fcn.00409770
add esp, 4
mov ecx, dword [0x45de54]
mov al, byte [ecx + 0x14]
test al, al
jne 0x41e13c
mov eax, dword [ecx]
jmp 0x41e151
cmp al, 1
jne 0x41e14c
mov ecx, 0x45ef58
call section..text
jmp 0x41e151
mov eax, str.Unsupported_script_variable_type.
push 0x7f
push eax
push 0x45d64e
call fcn.00443880
mov eax, dword [0x45d838]
mov byte [0x45d6cd], 0
mov ecx, 0x3a
mov esi, 0x45d5f8
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
cmp eax, ebx
mov ecx, 0x3a
mov esi, 0x45d400
mov edi, 0x45d5f8
rep movsd dword es:[edi], dword [esi]
mov dword [0x45ef20], ebx
mov dword [0x45ef24], ebx
je 0x41e1a9
push 0x45de58
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov cl, byte [0x45d814]
mov bl, byte [0x45b056]
mov byte [esp + 0x13], cl
push 0
mov ecx, 0x45ebb8
mov byte [0x45b056], 0
call fcn.00410910
mov eax, dword [0x45d820]
mov edx, dword [esp + 0x14]
push 0
push 0
push 0
push 0
push 0
inc eax
push 0
mov dword [0x45d820], eax
mov eax, dword [edx + 0x2fc]
mov ecx, dword [eax + 4]
push 0
push 1
mov byte [0x4612b6], 1
call fcn.0041d2e0
test eax, eax
jne 0x41e235
mov ecx, dword [0x45d6e8]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x41e229
mov edx, dword [0x45d6e8]
push edx
mov byte [0x45d6e4], 1
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp + 0x10]
push eax
call fcn.00409770
add esp, 4
mov ecx, dword [0x45d820]
mov al, byte [esp + 0x12]
dec ecx
test al, al
mov dword [0x45d820], ecx
mov byte [0x4612b6], 0
je 0x41e282
mov ecx, dword [0x45d6e8]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x41e276
mov edx, dword [0x45d6e8]
push edx
mov byte [0x45d6e4], 1
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [ebp + 0x10]
push eax
call fcn.00409770
add esp, 4
push 0
mov ecx, 0x3a
lea esi, [esp + 0x1c]
mov edi, 0x45d5f8
push 0xffffffffffffffff
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x45de54]
push 0x45d64e
call fcn.0043e8a0
mov al, byte [0x45d828]
test al, al
je 0x41e2ec
mov al, byte [0x45d6d8]
test al, al
je 0x41e2ec
mov eax, dword [0x45d824]
mov ecx, dword [0x45d6e8]
push 0
push 0x801f
dec eax
push ecx
mov byte [0x45d828], 0
mov byte [0x45d6d8], 0
mov dword [0x45d824], eax
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
push 0
mov ecx, 0x45ebb8
call fcn.00410910
mov al, byte [esp + 0x13]
test al, al
mov byte [0x45d60c], 1
mov byte [0x45b056], bl
je 0x41e35b
mov al, byte [0x45d814]
test al, al
jne 0x41e35b
mov eax, dword [0x45ef2c]
cmp eax, 0xa
jge 0x41e325
mov eax, 0xa
mov edx, dword [0x45d6e8]
push 0x401350
push eax
push 0xa
push edx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d814], al
jne 0x41e35b
push 0
push str.SetTimer___unexpectedly_failed.
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc