Function at 0x476650
Capabilities:
Check if file exists
Create directory
Delete file
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [0x405198], 8
je 0x475eb2
push dword [ebp + 8]
call fcn.00476774
leave
ret 4
mov eax, dword [0x4051a4]
cmp eax, 0xcb
jl 0x475ed6
cmp eax, 0xcd
jg 0x475ed6
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
mov eax, dword [ebp - 0xc]
jmp 0x476766
cmp eax, 0xce
jl 0x476748
cmp eax, 0xe0
jg 0x476748
push 0x28
call fcn.004768c5
cmp eax, 0xce
jne 0x475f42
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
push 0x2c
call fcn.004768c5
lea edx, [ebp - 8]
push edx
call fcn.00475ad4
mov ecx, 1
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
test ebx, ebx
jl 0x475f3b
test edx, edx
jl 0x475f3b
mov eax, edx
and eax, 1
je 0x475f30
imul ecx, ebx
sar edx, 1
jne 0x475f36
jmp 0x475f3b
imul ebx, ebx
jmp 0x475f26
mov eax, ecx
jmp 0x47673f
cmp eax, 0xcf
jne 0x475f77
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
push 0x2c
call fcn.004768c5
lea edx, [ebp - 8]
push edx
call fcn.00475ad4
push dword [ebp - 8]
push dword [ebp - 0xc]
call fcn.0046b905
mov eax, dword [0x4011c8]
jmp 0x47673f
cmp eax, 0xd0
jne 0x475faa
call dword [sym.imp.msvcrt.dll_rand]
call fcn.00472d2d
cmp word [esi], 0x29
je 0x475fa5
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
mov ecx, dword [ebp - 0xc]
cmp ecx, 0
je 0x475fa3
cdq
idiv ecx
mov eax, edx
jmp 0x47673f
cmp eax, 0xd1
jne 0x475fc7
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
mov eax, dword [ebp - 0xc]
cdq
xor eax, edx
sub eax, edx
jmp 0x47673f
cmp eax, 0xd2
jne 0x475fe4
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
push dword [ebp - 0xc]
call fcn.0046b809
jmp 0x47673f
cmp eax, 0xd3
jne 0x4760d8
call fcn.00472d2d
cmp word [esi], 0x29
jne 0x476005
call dword [sym.imp.kernel32.dll_GetTickCount]
jmp 0x47673f
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
mov eax, dword [ebp - 0xc]
test eax, eax
jle 0x475ffa
cmp eax, 1
jne 0x476028
push 0
push 0
call fcn.00472ece
jmp 0x4760d3
cmp eax, 2
jne 0x47604b
mov ebx, dword [0x40519c]
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
push 0x28
push ebx
push eax
call dword [sym.imp.psapi.dll_GetProcessMemoryInfo]
mov eax, dword [ebx + 0xc]
jmp 0x4760d3
cmp eax, 3
jne 0x476058
call dword [sym.imp.kernel32.dll_GetSystemDefaultUILanguage]
jmp 0x4760d3
cmp eax, 4
jne 0x476065
call dword [sym.imp.kernel32.dll_GetUserDefaultUILanguage]
jmp 0x4760d3
cmp eax, 5
jne 0x476072
call dword [sym.imp.kernel32.dll_GetConsoleCP]
jmp 0x4760d3
cmp eax, 6
jne 0x47607f
call dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
jmp 0x4760d3
cmp eax, 7
jne 0x476092
push dword [0x405150]
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x4760d3
cmp eax, 8
jne 0x47609e
mov eax, dword [0x4051f4]
jmp 0x4760d3
cmp eax, 9
jne 0x4760aa
mov eax, dword [0x4051e4]
jmp 0x4760d3
cmp eax, 0xa
jne 0x4760b6
mov eax, dword [0x4051f0]
jmp 0x4760d3
cmp eax, 0xb
jne 0x4760c6
push 0
push 1
call fcn.00472ece
jmp 0x4760d3
cmp eax, 0x1b5
jl 0x4760d3
call dword [sym.imp.kernel32.dll_SetConsoleOutputCP]
jmp 0x47673f
cmp eax, 0xd4
jne 0x4761f5
call fcn.0047452b
call fcn.00472d2d
xor eax, eax
cmp dword [0x405198], 9
je 0x476101
cmp dword [0x405198], 0xa
jne 0x476131
mov bx, word [esi]
lea edx, [ebp - 0xc]
push edx
call fcn.00475897
cmp bx, 0x5d
jne 0x476118
mov eax, dword [eax + 0x50]
jmp 0x47612c
mov edi, dword [eax + 0x44]
mov ecx, dword [ebp - 0xc]
lea eax, [edi + ecx*4]
push dword [eax]
call fcn.0046faad
mov edi, eax
jmp 0x4761a6
jmp 0x4761f0
cmp dword [0x405198], 0xd
jne 0x476150
cmp word [esi], 0x5d
jne 0x476150
add esi, 2
call fcn.00476f3e
mov eax, dword [eax + 0x4c]
jmp 0x4761f0
cmp dword [0x405198], 3
je 0x476194
cmp dword [0x405198], 0xb
je 0x476194
cmp dword [0x405198], 8
jne 0x476179
cmp eax, 0xe1
jl 0x476179
cmp eax, 0xf4
jle 0x476194
cmp dword [0x405198], 0xa
je 0x476194
cmp dword [0x405198], 0xd
je 0x476194
cmp dword [0x405198], 8
jne 0x4761f0
mov esi, dword [0x4051d8]
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
mov edi, dword [ebp - 0xc]
push 4
nop
call 0x4761b8
push 0x74007400
add byte [eax], dh
add byte [eax], al
push edi
call dword [sym.imp.shlwapi.dll_StrCmpNIW]
cmp eax, 0
jne 0x4761ce
push 0
push edi
call fcn.0047316d
jmp 0x4761f0
mov ebx, dword [0x40519c]
push ebx
push 0
push edi
call dword [sym.imp.kernel32.dll_GetFileAttributesExW]
cmp eax, 0
jne 0x4761ed
mov eax, 0xffffffff
jmp 0x47673f
mov eax, dword [ebx + 0x20]
jmp 0x47673f
cmp eax, 0xd5
jne 0x476212
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
push dword [ebp - 0xc]
call fcn.00472da6
jmp 0x47673f
cmp eax, 0xd6
jne 0x47626f
call fcn.0047452b
call fcn.00472d2d
cmp dword [0x405198], 9
je 0x476235
cmp dword [0x405198], 0xa
jne 0x476252
lea edx, [ebp - 0xc]
push edx
call fcn.00475897
mov edi, dword [eax + 0x44]
mov ecx, dword [ebp - 0xc]
push dword [edi + ecx*4]
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x47673f
mov esi, dword [0x4051d8]
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
push dword [ebp - 0xc]
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x47673f
cmp eax, 0xd7
jne 0x47628c
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov ax, word [ebx]
jmp 0x47673f
cmp eax, 0xd8
jne 0x47629d
call fcn.00470199
jmp 0x47673f
cmp eax, 0xd9
jne 0x47633d
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
push 0x2c
call fcn.004768c5
lea edx, [ebp - 8]
push edx
call fcn.0046ebe3
call fcn.00472d2d
cmp word [esi], 0x29
jne 0x4762d5
mov dword [ebp - 4], 1
jmp 0x4762e5
push 0x2c
call fcn.004768c5
lea edx, [ebp - 4]
push edx
call fcn.00475ad4
push dword [ebp - 8]
call dword [sym.imp.kernel32.dll_lstrlenW]
test eax, eax
je 0x47673f
push dword [ebp - 0xc]
call dword [sym.imp.kernel32.dll_lstrlenW]
test eax, eax
je 0x47673f
mov ebx, dword [ebp - 4]
cmp ebx, 1
jl 0x476313
cmp ebx, eax
jbe 0x47631a
xor eax, eax
jmp 0x47673f
add ebx, ebx
add ebx, dword [ebp - 0xc]
sub ebx, 2
push dword [ebp - 8]
push ebx
call dword [sym.imp.shlwapi.dll_StrStrW]
cmp eax, 0
je 0x476338
sub eax, ebx
shr eax, 1
add eax, 1
jmp 0x47673f
cmp eax, 0xda
jne 0x47637b
push 0x4051e0
call fcn.00475ad4
mov eax, dword [0x4051e0]
mov ebx, dword [0x405200]
cmp eax, 0
jl 0x47636a
cmp eax, 0xffff
jg 0x47636a
cmp ebx, 1
jne 0x476371
mov eax, 0xffffffff
jmp 0x476376
call fcn.0046ccdf
jmp 0x47673f
cmp eax, 0xdb
jne 0x4763f2
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
push 0x2c
call fcn.004768c5
lea edx, [ebp - 8]
push edx
call fcn.00475ad4
push 0x2c
call fcn.004768c5
lea edx, [ebp - 4]
push edx
call fcn.0046ebe3
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov ebx, dword [0x405200]
cmp eax, 0
je 0x4763de
cmp ebx, 0
je 0x4763de
cmp edx, 0
je 0x4763de
cmp ecx, dword [0x4051e0]
je 0x4763de
cmp ecx, 0
jl 0x4763de
cmp ecx, 0xffff
jle 0x4763e5
mov eax, 0xffffffff
jmp 0x4763ed
push edx
push ecx
push eax
call fcn.0046d0ea
jmp 0x47673f
cmp eax, 0xdc
jne 0x476403
call fcn.0046ce6a
jmp 0x47673f
cmp eax, 0xdd
jne 0x4764d7
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
push 0x2c
call fcn.004768c5
lea edx, [ebp - 8]
push edx
call fcn.0046ebe3
push 0x2c
call fcn.004768c5
call fcn.0047452b
cmp dword [0x405198], 9
je 0x476445
cmp dword [0x405198], 0xa
jne 0x476452
lea edx, [ebp - 4]
push edx
call fcn.00475897
mov ebx, eax
jmp 0x476466
mov esi, dword [0x4051d8]
lea edx, [ebp - 4]
push edx
call fcn.00475ad4
mov ebx, 0xffffffff
mov dword [ebp - 4], 0
cmp dword [ebp - 0xc], 0
je 0x4764cf
mov edx, dword [ebp - 8]
xor eax, eax
mov ax, word [edx]
mov dword [ebp - 8], eax
lea edx, [ebp - 8]
push edx
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_wcstok]
add esp, 8
cmp eax, 0
je 0x4764cf
cmp ebx, 0xffffffff
je 0x4764ba
mov edi, eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebx + 0x50]
jge 0x4049eb
lea ecx, [ecx*4]
mov edx, dword [ebx + 0x44]
add edx, ecx
push edi
call fcn.00472ced
mov dword [edx], eax
add dword [ebp - 4], 1
lea edx, [ebp - 8]
push edx
push 0
call dword [sym.imp.msvcrt.dll_wcstok]
add esp, 8
jmp 0x47648e
mov eax, dword [ebp - 4]
jmp 0x47673f
cmp eax, 0xde
jne 0x476526
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
push 0x2c
call fcn.004768c5
lea edx, [ebp - 8]
push edx
call fcn.00475ad4
push 0x2c
call fcn.004768c5
lea edx, [ebp - 4]
push edx
call fcn.00475ad4
mov ecx, dword [ebp - 8]
add ecx, 1
sub ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
shr eax, cl
or edx, 0xffffffff
mov ecx, dword [ebp - 4]
shl edx, cl
not edx
and eax, edx
jmp 0x47673f
cmp eax, 0xdf
jne 0x4765ba
call fcn.00472d2d
cmp word [esi], 0x29
jne 0x476546
mov eax, dword [0x4051fc]
jmp 0x47673f
lea edx, [ebp - 0xc]
push edx
call fcn.00475ad4
mov eax, dword [ebp - 0xc]
cmp eax, 0
jle 0x476580
cmp eax, 0xffff
jge 0x476580
cmp dword [0x4051f8], 0
jne 0x47657e
push 1
push 0
push 0x476bf2
push 0
push eax
call dword [sym.imp.winmm_timeSetEvent]
mov dword [0x4051f8], eax
jmp 0x4765b5
cmp eax, 0
jne 0x4765a6
cmp dword [0x4051f8], 0
je 0x4765a4
push dword [0x4051f8]
call dword [sym.imp.winmm_timeKillEvent]
mov dword [0x4051f8], 0
jmp 0x4765b5
cmp eax, 0
jge 0x4765b5
mov dword [0x4051fc], 0
jmp 0x47673f
cmp eax, 0xe0
jne 0x47673f
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
push 0x2c
call fcn.004768c5
call fcn.0047452b
mov esi, dword [0x4051d8]
cmp dword [0x405198], 3
je 0x476612
cmp dword [0x405198], 0xb
je 0x476612
cmp dword [0x405198], 8
jne 0x476609
cmp eax, 0xe1
jl 0x476609
cmp eax, 0xf4
jle 0x476612
cmp dword [0x405198], 0xa
jne 0x476634
lea edx, [ebp - 8]
push edx
call fcn.0046ebe3
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.kernel32.dll_MoveFileW]
test eax, eax
je 0x47672a
jmp 0x47673f
lea edx, [ebp - 8]
push edx
call fcn.00475ad4
mov ebx, dword [ebp - 0xc]
nop
call 0x476650
or dword [eax], eax
and byte [eax], al
or eax, 0xa00
add byte [ebx - 1], dl
adc eax, sym.imp.shlwapi.dll_StrTrimW
push ebx
call dword [sym.imp.kernel32.dll_lstrlenW]
test eax, eax
je 0x47673f
mov ecx, dword [ebp - 8]
mov eax, 0xffffffff
cmp ecx, 0
jne 0x4766b6
mov edi, dword [0x40519c]
push 0x104
push edi
call fcn.0046bfb4
mov dword [edi + 4], 3
mov eax, dword [0x4051a0]
push 0x1000
push eax
call fcn.0046bfb4
push ebx
push eax
call dword [sym.imp.kernel32.dll_lstrcpyW]
mov dword [edi + 8], eax
mov dword [edi + 0x10], 0x215
push edi
call dword [sym.imp.shell32_SHFileOperationW]
jmp 0x476728
cmp ecx, 1
jne 0x4766ca
push 0
push ebx
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
test eax, eax
je 0x47672a
jmp 0x476728
cmp ecx, 2
jne 0x4766f8
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.kernel32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x47672a
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
xor eax, eax
jmp 0x476728
cmp ecx, 3
jne 0x47670a
push ebx
call dword [sym.imp.shlwapi.dll_PathFileExistsW]
test eax, eax
je 0x47672a
jmp 0x476728
cmp ecx, 4
jne 0x47671c
push ebx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x47672a
jmp 0x476728
cmp ecx, 5
jne 0x476728
push ebx
call dword [sym.imp.shlwapi.dll_PathIsDirectoryW]
jmp 0x47673f
push eax
call dword [sym.imp.kernel32.dll_GetLastError]
mov edx, dword [0x405158]
push eax
pop dword [edx + 0x44]
add edx, 0x58
pop eax
push 0x29
call fcn.004768c5
jmp 0x476766
cmp eax, 0
jne 0x476754
call fcn.0046d250
jmp 0x476766
mov esi, dword [0x4051d8]
lea edx, [ebp - 0xc]
push edx
call fcn.0046ebe3
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
call fcn.0047452b
leave
ret 4