Function at 0x50583b
Capabilities:
Set current directory

Disassembly:
mov eax, 0x5ea245
call fcn.00594e8c
sub esp, 0x1c
push esi
mov dword [ebp - 0x24], ecx
cmp dword [ebp + 0xc], 0
jg 0x505857
jmp 0x505c35
lea ecx, [ebp - 0x10]
call fcn.0040b0ee
and dword [ebp - 4], 0
cmp dword [ebp + 8], 0xffffffff
jne 0x505aa5
mov ecx, dword [ebp - 0x24]
add ecx, 0x86ca4
call fcn.0041f82c
movzx eax, al
test eax, eax
je 0x505893
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
add eax, dword [ebp + 0xc]
cmp eax, 0x3e6
jle 0x5058c4
push str.Nested_too_deep
mov ecx, dword [ebp - 0x24]
call fcn.004ef240
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
mov ecx, dword [0x68385c]
add ecx, 0x80bbc
call fcn.00517034
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
mov ecx, dword [ebp - 0x24]
add ecx, 0x86ca4
call fcn.00428a86
movsx eax, al
cmp eax, 0x2d
je 0x50591b
mov eax, dword [ebp - 0x24]
push dword [eax + 0x86ca4]
mov eax, dword [0x68385c]
push dword [eax + 0x80bbc]
push str._sSubRoutines_s
lea eax, [ebp - 0x10]
push eax
call fcn.0040ad5c
add esp, 0x10
jmp 0x505938
push 0x96
mov ecx, dword [ebp - 0x24]
add ecx, 0x86ca4
call fcn.0041d7d9
inc eax
push eax
lea ecx, [ebp - 0x10]
call fcn.0040b14b
mov eax, dword [ebp - 0x24]
add eax, 0x11bb70
push eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx + eax + 0x86ca8]
call fcn.0040b132
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax + 0x86cb0], 1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [0x6834e0]
mov dword [ecx + eax + 0x86cac], edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
inc eax
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 0xc3a90], eax
cmp dword [ebp + 0xc], 0
jle 0x505a20
and dword [ebp - 0x14], 0
jmp 0x5059b5
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
dec eax
cmp dword [ebp - 0x14], eax
jge 0x505a20
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
or dword [ecx + eax + 0x86cac], 0xffffffff
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx + eax + 0x86ca8]
call fcn.0040b132
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax + 0x86cb0], 1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
inc eax
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 0xc3a90], eax
jmp 0x5059ae
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax + 0x86cb0], 1
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
lea eax, [ebp - 0x10]
push eax
call fcn.0040b108
mov ecx, dword [ebp - 0x24]
call fcn.00505dbd
mov byte [ebp - 0x25], al
movzx eax, byte [ebp - 0x25]
test eax, eax
jne 0x505a86
push str.No_Subroutine_Found
mov ecx, dword [ebp - 0x24]
call fcn.004ef240
and dword [0x6834d4], 0
mov ecx, dword [ebp - 0x24]
call fcn.00505c44
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
or dword [0x6834e0], 0xffffffff
and dword [0x6834dc], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0xc3a8c], 0
jne 0x505ac2
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
and dword [ebp - 0x18], 0
jmp 0x505acf
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [eax + 0xc3a8c]
jge 0x505c29
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx + eax*8 + 0x29e7c0]
cmp eax, dword [ebp + 8]
jne 0x505c24
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0xc3a90], 0x3e6
jle 0x505b17
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax + 0x86cb0], 0
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [0x6834e0]
mov dword [ecx + eax + 0x86cac], edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
inc eax
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 0xc3a90], eax
cmp dword [ebp + 0xc], 0
jle 0x505c08
and dword [ebp - 0x1c], 0
jmp 0x505b74
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
dec eax
cmp dword [ebp - 0x1c], eax
jge 0x505c08
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x24]
mov edx, dword [esi + edx*8 + 0x29e7c4]
mov dword [ecx + eax + 0x86cac], edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov byte [ecx + eax + 0x86cb0], 0
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0xc3a90]
inc eax
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 0xc3a90], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0xc3a90], 0x3e6
jle 0x505c03
and dword [0x6834d4], 0
push 0
push 0
push 0x614c24
mov ecx, dword [ebp - 0x24]
call fcn.005baf52
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
jmp 0x505c35
jmp 0x505b6d
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx + eax*8 + 0x29e7c4]
mov dword [0x6834e0], eax
mov eax, dword [0x6834e0]
mov dword [0x6834dc], eax
jmp 0x505ac8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0040b121
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
leave
ret 8