Function at 0x404906
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x738
and dword [ebp - 0x620], 0
and dword [ebp - 0x734], 0
and dword [ebp - 0x730], 0
movzx eax, word [ebp + 8]
cmp eax, 8
jne 0x4045e2
cmp dword [ebp + 0x10], 0
je 0x4045e2
push dword [ebp + 0x10]
call fcn.0041ea20
pop ecx
test eax, eax
je 0x4045e2
movzx eax, word [ebp + 0x18]
cmp eax, 8
jne 0x4045e2
cmp dword [ebp + 0x20], 0
je 0x4045e2
push dword [ebp + 0x20]
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x4045ea
push 3
pop eax
jmp 0x404cf4
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x40c]
push eax
push dword [ebp + 0x10]
call fcn.0041fd48
add esp, 0x14
lea eax, [ebp - 0x408]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x404653
push 0x436c30
lea eax, [ebp - 0x208]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
je 0x40467b
movzx eax, byte [ebp + 0x28]
and eax, 2
jne 0x404653
lea eax, [ebp - 0x208]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x40467b
push 0x436c34
lea eax, [ebp - 0x408]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
jne 0x4046a1
lea eax, [ebp - 0x208]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x4046a1
push 0x436c38
lea eax, [ebp - 0x408]
push eax
call fcn.0041eab0
pop ecx
pop ecx
push 0x436c3c
lea eax, [ebp - 0x208]
push eax
call fcn.0041eab0
pop ecx
pop ecx
push dword [ebp + 0x10]
call fcn.00404516
pop ecx
mov dword [ebp - 0x72c], eax
cmp dword [ebp - 0x72c], 0
jne 0x40480b
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x61c], eax
cmp dword [ebp - 0x61c], 0xffffffff
jne 0x4046e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x404cf4
mov eax, dword [ebp - 0x61c]
and eax, 0x10
je 0x40480b
mov dword [ebp - 0x734], 1
lea eax, [ebp - 0x408]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x404736
push 0x436c40
lea eax, [ebp - 0x408]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
je 0x404736
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x728]
push eax
call fcn.0041eac0
pop ecx
pop ecx
lea eax, [ebp - 0x208]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x404773
push 0x436c44
lea eax, [ebp - 0x208]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
je 0x404773
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x728]
push eax
call fcn.0041eac0
pop ecx
pop ecx
movzx eax, byte [ebp + 0x28]
and eax, 2
jne 0x4047ec
lea eax, [ebp - 0x728]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x4047ba
lea eax, [ebp - 0x728]
push eax
call fcn.0041ea20
pop ecx
movsx eax, byte [ebp + eax - 0x729]
cmp eax, 0x5c
je 0x4047ba
push 0x436c48
lea eax, [ebp - 0x728]
push eax
call fcn.0041eac0
pop ecx
pop ecx
mov dword [ebp - 0x72c], 1
push 0x436c4c
lea eax, [ebp - 0x208]
push eax
call fcn.0041eab0
pop ecx
pop ecx
push 0x436c50
lea eax, [ebp - 0x408]
push eax
call fcn.0041eab0
pop ecx
pop ecx
jmp 0x40480b
movzx eax, byte [ebp + 0x28]
and eax, 4
je 0x4047fd
push 0x57
pop eax
jmp 0x404cf4
mov byte [ebp - 0x408], 0
mov byte [ebp - 0x208], 0
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0x20]
call fcn.0041fd48
add esp, 0x14
lea eax, [ebp - 0x618]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x40485a
push 0x436c54
lea eax, [ebp - 0x308]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
je 0x404882
push 0x436c58
lea eax, [ebp - 0x618]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
jne 0x4048a8
lea eax, [ebp - 0x308]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x4048a8
push 0x436c5c
lea eax, [ebp - 0x618]
push eax
call fcn.0041eab0
pop ecx
pop ecx
push 0x436c60
lea eax, [ebp - 0x308]
push eax
call fcn.0041eab0
pop ecx
pop ecx
push dword [ebp + 0x20]
call fcn.00404516
pop ecx
mov dword [ebp - 0x108], eax
cmp dword [ebp - 0x108], 0
je 0x4048ec
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.0041eab0
pop ecx
pop ecx
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.0041eac0
pop ecx
pop ecx
jmp 0x4048fd
push dword [ebp + 0x20]
lea eax, [ebp - 0x518]
push eax
call fcn.0041eab0
pop ecx
pop ecx
lea eax, [ebp - 0x518]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x404c90
lea eax, [ebp - 0x518]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x61c], eax
cmp dword [ebp - 0x61c], 0xffffffff
je 0x404b7a
mov eax, dword [ebp - 0x61c]
and eax, 0x10
je 0x404b5b
mov dword [ebp - 0x730], 1
cmp dword [ebp - 0x108], 0
jne 0x404a48
lea eax, [ebp - 0x618]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x404995
push 0x436c64
lea eax, [ebp - 0x618]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
je 0x404995
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x100]
push eax
call fcn.0041eac0
pop ecx
pop ecx
lea eax, [ebp - 0x308]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x4049d2
push 0x436c68
lea eax, [ebp - 0x308]
push eax
call fcn.0041fcc0
pop ecx
pop ecx
test eax, eax
je 0x4049d2
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x100]
push eax
call fcn.0041eac0
pop ecx
pop ecx
cmp dword [ebp - 0x734], 0
je 0x4049e4
movzx eax, byte [ebp + 0x28]
and eax, 2
jne 0x404a48
lea eax, [ebp - 0x100]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
je 0x404a22
lea eax, [ebp - 0x100]
push eax
call fcn.0041ea20
pop ecx
movsx eax, byte [ebp + eax - 0x101]
cmp eax, 0x5c
je 0x404a22
push 0x436c6c
lea eax, [ebp - 0x100]
push eax
call fcn.0041eac0
pop ecx
pop ecx
push 0x436c70
lea eax, [ebp - 0x308]
push eax
call fcn.0041eab0
pop ecx
pop ecx
push 0x436c74
lea eax, [ebp - 0x618]
push eax
call fcn.0041eab0
pop ecx
pop ecx
cmp dword [ebp - 0x734], 1
jne 0x404b59
movzx eax, byte [ebp + 0x28]
and eax, 2
je 0x404b59
lea eax, [ebp - 0x728]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x404a7b
push 3
pop eax
jmp 0x404cf4
lea eax, [ebp - 0x728]
push eax
call fcn.0041ea20
pop ecx
movsx eax, byte [ebp + eax - 0x729]
cmp eax, 0x5c
jne 0x404aaa
lea eax, [ebp - 0x728]
push eax
call fcn.0041ea20
pop ecx
mov byte [ebp + eax - 0x729], 0
lea eax, [ebp - 0x518]
push eax
call fcn.0041ea20
pop ecx
movsx eax, byte [ebp + eax - 0x519]
cmp eax, 0x5c
je 0x404ad7
push 0x436c78
lea eax, [ebp - 0x518]
push eax
call fcn.0041eac0
pop ecx
pop ecx
push 0x5c
lea eax, [ebp - 0x728]
push eax
call fcn.0041f3a0
pop ecx
pop ecx
mov dword [ebp - 0x738], eax
cmp dword [ebp - 0x738], 0
je 0x404b0e
mov eax, dword [ebp - 0x738]
inc eax
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.0041eac0
pop ecx
pop ecx
jmp 0x404b23
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.0041eac0
pop ecx
pop ecx
lea eax, [ebp - 0x518]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov dword [ebp - 0x624], eax
cmp dword [ebp - 0x624], 0
jne 0x404b4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x620], eax
mov eax, dword [ebp - 0x620]
jmp 0x404cf4
jmp 0x404b75
cmp dword [ebp - 0x72c], 0
jne 0x404b6d
movzx eax, byte [ebp + 0x28]
and eax, 4
je 0x404b75
push 0x57
pop eax
jmp 0x404cf4
jmp 0x404c90
cmp dword [ebp - 0x734], 1
jne 0x404bbe
movzx eax, byte [ebp + 0x28]
and eax, 2
je 0x404bbe
push dword [ebp + 0x20]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov dword [ebp - 0x624], eax
cmp dword [ebp - 0x624], 0
jne 0x404bb3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x620], eax
mov eax, dword [ebp - 0x620]
jmp 0x404cf4
cmp dword [ebp - 0x72c], 0
jne 0x404bd4
movzx eax, byte [ebp + 0x28]
and eax, 4
je 0x404c90
lea eax, [ebp - 0x518]
push eax
call fcn.0041ea20
pop ecx
movsx eax, byte [ebp + eax - 0x519]
cmp eax, 0x5c
je 0x404bf6
push 3
pop eax
jmp 0x404cf4
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.0041eab0
pop ecx
pop ecx
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x518]
push eax
call fcn.0041eac0
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x518]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x404c3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x404cf4
lea eax, [ebp - 0x618]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x404c62
push 0x436c7c
lea eax, [ebp - 0x618]
push eax
call fcn.0041eab0
pop ecx
pop ecx
lea eax, [ebp - 0x308]
push eax
call fcn.0041ea20
pop ecx
test eax, eax
jne 0x404c86
push 0x436c80
lea eax, [ebp - 0x308]
push eax
call fcn.0041eab0
pop ecx
pop ecx
mov dword [ebp - 0x730], 1
call fcn.00403c82
push dword [ebp + 0x28]
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x728]
push eax
lea eax, [ebp - 0x40c]
push eax
call fcn.00403d36
add esp, 0x24
push dword [ebp + 0x28]
push dword [0x44e888]
call fcn.00403c9c
pop ecx
pop ecx
mov dword [ebp - 0x620], eax
mov eax, dword [ebp - 0x620]
leave
ret