Function at 0x491d60
Capabilities:
Set current directory

Disassembly:
mov eax, 0x195c
call fcn.004b1040
mov eax, dword [0x4da8f0]
xor eax, esp
mov dword [esp + 0x1958], eax
push ebx
mov ecx, 0x5229e0
call fcn.00411c10
mov bl, byte [esp + 0x1968]
mov dword [esp + 8], edx
test bl, bl
je 0x491db5
and eax, 1
xor ecx, ecx
or eax, ecx
jne 0x491db5
xor al, al
pop ebx
mov ecx, dword [esp + 0x1958]
xor ecx, esp
call fcn.004b102c
add esp, 0x195c
ret 0x10
push ebp
push esi
call fcn.00494120
mov ebp, eax
xor eax, eax
xor esi, esi
push esi
mov word [0x53f540], ax
call fcn.00488820
lea ecx, [esp + 0x14]
push ecx
mov ecx, 0x5229e0
call fcn.00413350
push 0x400
push 0x52aca2
mov ecx, 0x5229e0
call fcn.00413320
mov edx, dword [esp + 0x94]
push 1
mov dword [0x528c34], edx
mov byte [0x528352], bl
mov dword [0x528814], 1
mov dword [0x5282f4], esi
mov dword [0x528318], esi
call fcn.00490130
cmp dword [esp + 0x138], esi
mov eax, dword [esp + 0x1978]
mov ebx, dword [esp + 0x196c]
push eax
setne cl
movzx edx, cl
push edx
push ebx
push 0x52aca2
push 0x4c79a8
push 0x53f540
call fcn.00490de0
test bl, bl
je 0x491e66
push 1
call fcn.00491bb0
test al, al
je 0x49219f
push edi
push 0x400
lea eax, [esp + 0x96c]
push eax
mov ecx, 0x5229e0
call fcn.00413300
cmp word [esp + 0x968], si
jne 0x491eb5
mov ecx, 0x5220b8
call fcn.004467b0
mov ecx, 0x5220b8
mov edi, eax
call fcn.00446810
cmp edi, eax
jne 0x491eb5
cmp dword [esp + 0x13c], esi
je 0x491ebf
cmp byte [esp + 0x15d], 0
jne 0x491ebf
cmp byte [esp + 0x1978], 0
je 0x491f32
push esi
push 0x3ff
push esi
lea ecx, [esp + 0x174]
push ecx
mov ecx, dword [0x52b4a4]
call fcn.004712a0
test al, al
je 0x491f1d
mov ecx, 0x4c77ac
lea eax, [esp + 0x168]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x491f10
test dl, dl
je 0x491f0c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x491f10
add eax, 2
add ecx, 2
test dl, dl
jne 0x491ef0
xor eax, eax
jmp 0x491f15
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, esi
je 0x491fc7
mov ecx, dword [0x52b4a4]
push 0x4c77ac
call fcn.00471160
jmp 0x491fc7
mov edx, dword [0x52b4a4]
push esi
push edx
mov ecx, 0x5220b8
call fcn.004469d0
test al, al
je 0x4920b7
mov eax, dword [0x52b4a4]
cmp dword [eax + 0x20], esi
jne 0x491fc7
xor eax, eax
jmp 0x491f60
movzx ecx, word [esp + eax + 0x968]
mov word [esp + eax + 0x168], cx
add eax, 2
cmp cx, si
jne 0x491f60
cmp word [esp + 0x168], si
je 0x491f8f
lea ecx, [esp + 0x168]
push ecx
call fcn.004561a0
lea edi, [esp + 0x168]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x491fa0
mov edx, dword [0x4c7f44]
mov ecx, dword [0x52b4a4]
lea eax, [esp + 0x168]
push eax
mov dword [edi], edx
call fcn.00471180
cmp dword [esp + 0x13c], esi
je 0x492044
cmp byte [esp + 0x15d], 0
jne 0x492044
mov ecx, 0x5220b8
call fcn.004467b0
mov esi, eax
test esi, esi
je 0x492034
cmp word [esp + 0x968], 0
jne 0x492044
mov ecx, 0x5220b8
call fcn.00446810
cmp esi, eax
jne 0x492044
mov ecx, dword [0x51c8dc]
mov edx, dword [0x508300]
push 0x52aca2
push 0x490d30
push ecx
push str.ASKPROCESSVOLDLG
push edx
call dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp eax, 0xffffffff
je 0x4920b7
cmp eax, 1
jne 0x492044
mov ecx, dword [0x52b4a4]
push 0x4c77ac
call fcn.00471160
xor eax, eax
mov word [esp + 0x1168], ax
cmp byte [esp + 0x1974], al
jne 0x4920be
cmp word [0x53f540], ax
je 0x4920be
cmp dword [0x52822c], 4
je 0x4920be
push 0x400
lea ecx, [esp + 0x116c]
push ecx
call fcn.0048cf70
push 0
push 0x53f540
call fcn.00436450
push 0x53f540
call fcn.0048cf50
test al, al
jne 0x4920be
push 0x53f540
push 0x1f7
call fcn.004671c0
push eax
call fcn.0049a620
add esp, 8
mov ecx, 0x508304
call fcn.0042cce0
xor al, al
jmp 0x49219e
movzx edx, byte [0x529c3b]
push 0
push edx
mov ecx, 0x5229e0
call fcn.00417e10
cmp word [esp + 0x1168], 0
je 0x4920eb
lea eax, [esp + 0x1168]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.00494120
cmp ebp, eax
jne 0x492130
cmp byte [0x51b788], 0
jne 0x492130
cmp byte [esp + 0x1974], 0
mov bl, 1
je 0x492134
push 0x40
push 0x3a7
call fcn.004671c0
push eax
push 0x3a8
call fcn.004671c0
mov ecx, dword [0x51c8dc]
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x492165
xor bl, bl
jmp 0x492165
cmp dword [0x529c50], 0
je 0x492165
push 0x52aca2
call fcn.00435ac0
test al, al
jne 0x492165
mov ecx, 0x5220b8
call fcn.00448b30
test al, al
je 0x492165
push 0
mov ecx, 0x5220b8
call fcn.004492b0
mov ecx, 0x51c8e0
mov byte [0x51c90c], 0
call fcn.00470460
cmp byte [esp + 0x1974], 0
jne 0x49219c
cmp byte [0x51b788], 0
jne 0x49219c
cmp byte [0x53f53c], 0
je 0x49219c
push 0x53f540
call fcn.00491010
mov al, bl
pop edi
mov ecx, dword [esp + 0x1964]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b102c
add esp, 0x195c
ret 0x10