Function at 0x5a98b4
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x3f
push 0
push 0
dec ecx
jne 0x5a98bc
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x5a9d04
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x5a9ca4
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [0x5c1278]
mov edx, dword [edx]
lea eax, [ebp - 0x1dc]
mov ecx, 0x5a9d18
call fcn.00405c48
mov eax, dword [ebp - 0x1dc]
call fcn.005790a0
test al, al
jne 0x5a9918
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5a9cae
mov edx, dword [0x5c1278]
mov edx, dword [edx]
lea eax, [ebp - 0x1e0]
mov ecx, 0x5a9d40
call fcn.00405c48
mov eax, dword [ebp - 0x1e0]
call fcn.00405bcc
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
mov edx, 0x5a9d54
lea eax, [ebp - 0x1d8]
call fcn.00403348
lea eax, [ebp - 0x1d8]
call fcn.004030cc
call fcn.00402ca4
cmp dword [0x5c8ec0], 0
jne 0x5a997b
mov dl, 1
mov eax, dword [0x4bff34]
call fcn.004c01c4
mov dword [0x5c8ec0], eax
cmp dword [0x5c8ec4], 0
jne 0x5a9995
mov dl, 1
mov eax, dword [0x4c00c0]
call fcn.004c1088
mov dword [0x5c8ec4], eax
cmp dword [0x5c8ec8], 0
jne 0x5a99af
mov dl, 1
mov eax, dword [0x4c00c0]
call fcn.004c1088
mov dword [0x5c8ec8], eax
cmp dword [0x5c8ecc], 0
jne 0x5a99c9
mov dl, 1
mov eax, dword [0x4c00c0]
call fcn.004c1088
mov dword [0x5c8ecc], eax
test bl, bl
jne 0x5a99e2
mov eax, dword [0x5c19b0]
mov eax, dword [eax]
mov eax, dword [eax + 0x424]
mov edx, dword [eax]
call dword [edx + 0xd8]
mov eax, dword [0x5c8ec0]
mov si, 0xffff
call fcn.004044b4
mov eax, dword [0x5c8ec4]
mov edx, dword [eax]
call dword [edx + 0x40]
mov eax, dword [0x5c8ec8]
mov edx, dword [eax]
call dword [edx + 0x40]
mov eax, dword [0x5c8ecc]
mov edx, dword [eax]
call dword [edx + 0x40]
jmp 0x5a9c72
lea edx, [ebp - 4]
lea eax, [ebp - 0x1d8]
call fcn.0040397c
lea eax, [ebp - 0x1d8]
call fcn.004039e8
call fcn.00402ca4
lea edx, [ebp - 0x1e4]
mov eax, dword [ebp - 4]
call fcn.0040c5e0
mov edx, dword [ebp - 0x1e4]
lea eax, [ebp - 4]
call fcn.00405264
mov edx, dword [ebp - 4]
mov eax, 0x5a9d68
call fcn.004057e0
dec eax
je 0x5a9c72
mov edx, dword [ebp - 4]
mov eax, 0x5a9d74
call fcn.004057e0
dec eax
je 0x5a9c72
mov edx, dword [ebp - 4]
mov eax, 0x5a9d80
call fcn.004057e0
dec eax
je 0x5a9c72
mov edx, dword [ebp - 4]
mov eax, 0x5a9d8c
call fcn.004057e0
dec eax
je 0x5a9c72
mov eax, dword [ebp - 4]
call fcn.0040549c
test eax, eax
je 0x5a9c72
lea eax, [ebp - 0x1e8]
push eax
mov edx, dword [ebp - 4]
mov eax, 0x5a9d98
call fcn.004057e0
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.004056fc
mov eax, dword [ebp - 0x1e8]
lea edx, [ebp - 8]
call fcn.0040c22c
mov eax, dword [ebp - 8]
call fcn.0040549c
test eax, eax
je 0x5a9c72
mov edx, dword [ebp - 8]
mov eax, 0x5a9da4
call fcn.004057e0
dec eax
jne 0x5a9b11
lea eax, [ebp - 8]
mov ecx, 3
mov edx, 1
call fcn.0040573c
lea eax, [ebp - 0x1ec]
push eax
mov edx, dword [ebp - 4]
mov eax, 0x5a9d98
call fcn.004057e0
inc eax
push eax
mov eax, dword [ebp - 4]
call fcn.0040549c
mov ecx, eax
mov eax, dword [ebp - 4]
pop edx
call fcn.004056fc
mov eax, dword [ebp - 0x1ec]
lea edx, [ebp - 0xc]
call fcn.0040c5e0
mov eax, dword [ebp - 0xc]
call fcn.0040549c
test eax, eax
je 0x5a9c72
or edx, 0xffffffff
mov eax, dword [ebp - 0xc]
call fcn.0040cb88
mov edi, eax
cmp edi, 1
jge 0x5a9b6f
mov edi, 1
cmp edi, 3
jle 0x5a9b79
mov edi, 3
mov eax, 8
call fcn.0040c16c
mov esi, eax
mov eax, esi
mov edx, dword [ebp - 8]
call fcn.00405220
mov dword [esi + 4], edi
mov edx, esi
mov eax, dword [0x5c8ec0]
call fcn.004c0238
test bl, bl
jne 0x5a9c68
mov eax, dword [0x5c19b0]
mov eax, dword [eax]
mov eax, dword [eax + 0x424]
call fcn.004fcb5c
call fcn.004fc5a4
mov eax, dword [0x5c19b0]
mov eax, dword [eax]
mov eax, dword [eax + 0x424]
call fcn.004fcb5c
call fcn.0044bcfc
dec eax
push eax
mov eax, dword [0x5c19b0]
mov eax, dword [eax]
mov eax, dword [eax + 0x424]
call fcn.004fcb5c
pop edx
call fcn.004fc5bc
push eax
lea eax, [ebp - 0x1f0]
mov edx, dword [ebp - 8]
call fcn.00405b50
mov edx, dword [ebp - 0x1f0]
pop eax
call fcn.004fc43c
lea edx, [ebp - 0x1f8]
mov eax, edi
call fcn.005b13bc
mov edx, dword [ebp - 0x1f8]
lea eax, [ebp - 0x1f4]
call fcn.00405b50
mov eax, dword [ebp - 0x1f4]
push eax
mov eax, dword [0x5c19b0]
mov eax, dword [eax]
mov eax, dword [eax + 0x424]
call fcn.004fcb5c
call fcn.0044bcfc
dec eax
push eax
mov eax, dword [0x5c19b0]
mov eax, dword [eax]
mov eax, dword [eax + 0x424]
call fcn.004fcb5c
pop edx
call fcn.004fc5bc
mov eax, dword [eax + 0x30]
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edx, edi
mov eax, dword [ebp - 8]
call fcn.005aa28c
lea eax, [ebp - 0x1d8]
call fcn.00403668
call fcn.00402ca4
test al, al
je 0x5a9a13
lea eax, [ebp - 0x1d8]
call fcn.004034c4
call fcn.00402ca4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5a9cae
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5a9d0b
lea eax, [ebp - 0x1f8]
call fcn.004051cc
lea eax, [ebp - 0x1f4]
mov edx, 2
call fcn.0040599c
lea eax, [ebp - 0x1ec]
mov edx, 3
call fcn.004051f0
lea eax, [ebp - 0x1e0]
mov edx, 2
call fcn.0040599c
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004051f0
ret