Function at 0x4013c0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xf0
mov al, byte [0x45d60c]
test al, al
push ebx
push ebp
push esi
push edi
je 0x401642
mov al, byte [0x45b056]
test al, al
je 0x401642
mov eax, dword [0x45d82c]
test eax, eax
jne 0x401642
mov eax, dword [0x45d824]
test eax, eax
jg 0x401642
mov eax, dword [0x45d820]
cmp eax, dword [0x45b060]
jge 0x401642
mov ebp, dword [0x45eebc]
xor esi, esi
test ebp, ebp
mov dword [esp + 0x14], esi
je 0x401642
lea esp, [esp]
mov al, byte [ebp + 0x14]
test al, al
je 0x4015ac
cmp byte [ebp + 0xc], 1
jae 0x4015ac
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x45d614]
jl 0x4015ac
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, dword [ebp + 0x10]
mov ebx, eax
mov eax, dword [ebp + 4]
mov edx, ebx
sub edx, ecx
cmp edx, eax
jb 0x4015ac
test esi, esi
jne 0x4014ad
mov edi, dword [0x45d820]
mov ecx, dword [0x45de54]
inc edi
push 0x80
mov dword [0x45d820], edi
call fcn.00401080
push eax
push 0x45d64e
call fcn.00401050
mov ecx, 0x3a
mov esi, 0x45d5f8
lea edi, [esp + 0x24]
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x45d838]
xor eax, eax
cmp ecx, eax
mov dword [0x45ef20], eax
mov dword [0x45ef24], eax
je 0x4014ce
push 0x45de58
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov eax, dword [0x45ef2c]
test eax, eax
mov ecx, 0x3a
mov esi, 0x45d400
mov edi, 0x45d5f8
rep movsd dword es:[edi], dword [esi]
je 0x401546
mov ecx, dword [0x45ef28]
test ecx, ecx
je 0x401546
test eax, eax
mov byte [0x45d60c], 0
jle 0x401546
mov cl, byte [0x45d814]
test cl, cl
jne 0x401546
cmp eax, 0xa
jge 0x401511
mov eax, 0xa
push 0x401350
push eax
mov eax, dword [0x45d6e8]
push 0xa
push eax
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
test al, al
mov byte [0x45d814], al
jne 0x401546
push 0
push str.SetTimer___unexpectedly_failed.
push 1
mov ecx, 0x45ebb8
call fcn.0041e040
mov ecx, dword [ebp + 8]
push 0
push 0
push 0
push 0
mov dword [0x45d614], ecx
mov al, byte [ebp + 0xc]
mov edx, dword [ebp]
push 0
push 0
inc al
push 0
mov byte [ebp + 0xc], al
mov ecx, dword [edx + 4]
push 1
call fcn.0041d2e0
dec byte [ebp + 0xc]
mov al, byte [0x45d814]
test al, al
mov byte [0x45d60c], 1
je 0x40159e
mov eax, dword [0x45d6e8]
push 0xa
push eax
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x40159e
mov byte [0x45d814], 0
mov eax, dword [esp + 0x14]
inc eax
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x14], eax
mov esi, eax
mov ebp, dword [ebp + 0x18]
test ebp, ebp
jne 0x401430
test esi, esi
je 0x401642
dec dword [0x45d820]
push ebp
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 0x40162f
mov al, byte [0x45d6d8]
test al, al
je 0x40162f
mov ebx, dword [0x45d824]
mov ecx, dword [0x45d6e8]
push ebp
push 0x801f
dec ebx
push ecx
mov byte [0x45d828], 0
mov byte [0x45d6d8], 0
mov dword [0x45d824], ebx
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 byte [0x45d60c], 1
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret