Function at 0x402d06
Capabilities:
Delete file
Get common file path
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x3d4]
sub esp, 0x454
mov eax, dword [0x4095d0]
xor eax, ebp
mov dword [ebp + 0x3d0], eax
push ebx
push edi
xor ebx, ebx
push 2
pop edi
cmp byte [0x409e3c], bl
jne 0x402d3c
or dword [0x409e38], 0xffffffff
jmp 0x402e62
mov al, byte [0x40aa10]
mov cl, al
sub cl, 0x41
cmp cl, 0x19
ja 0x402d53
movsx edi, al
sub edi, 0x41
jmp 0x402d60
mov cl, al
sub cl, 0x61
jne 0x402d60
movsx edi, al
sub edi, 0x61
push esi
lea eax, [ebp + 0x290]
push eax
mov eax, dword [0x4091bc]
inc eax
push eax
push 0x40aa10
mov dword [ebp - 0x80], ebx
mov byte [ebp + 0x290], bl
call fcn.00402cbb
pop ecx
push eax
call fcn.00402b9e
add esp, 0xc
cmp byte [ebp + 0x290], bl
je 0x402e79
push 0x8000
lea eax, [ebp + 0x290]
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov esi, eax
push dword [0x4091c0]
call dword [sym.imp.KERNEL32.dll__lclose]
push dword [0x4091bc]
lea eax, [ebp + 0x3bc]
push str.temp_d.zme
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea eax, [ebp + 0x3bc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x3e2
mov dword [0x4091c0], esi
push esi
mov esi, dword [sym.imp.KERNEL32.dll__llseek]
call esi
mov edi, dword [sym.imp.KERNEL32.dll__lread]
push 1
push 0x409e3c
push dword [0x4091c0]
call edi
push 2
push ebx
push dword [0x4091c0]
call esi
push dword [0x4091c0]
mov dword [0x40a708], eax
call fcn.0040231d
pop ecx
mov dword [0x409e38], eax
push ebx
add eax, 8
push eax
push dword [0x4091c0]
call esi
push 4
push 0x40aa0c
push dword [0x4091c0]
call edi
add dword [0x409e38], 0xc
inc dword [0x4091bc]
cmp byte [0x409e3d], bl
je 0x402e61
call fcn.004029c4
pop esi
mov ecx, dword [ebp + 0x3d0]
pop edi
xor ecx, ebp
pop ebx
call fcn.00405284
add ebp, 0x3d4
leave
ret
mov esi, dword [ebp - 0x80]
cmp edi, 2
jge 0x402e9c
mov eax, dword [0x4091bc]
inc eax
push edi
push eax
call fcn.004026ee
pop ecx
pop ecx
test eax, eax
jne 0x402ede
mov dword [0x409e38], ebx
jmp 0x402e61
cmp byte [ebp + 0x290], bl
jne 0x402eb7
lea eax, [ebp + 0x290]
push 0x40aa10
push eax
call sub.MSVCR90.dll_strcpy
pop ecx
pop ecx
mov eax, dword [0x4091bc]
inc eax
push edi
push eax
lea eax, [ebp + 0x290]
push eax
call fcn.00402823
add esp, 0xc
test eax, eax
je 0x402f9f
cmp byte [ebp + 0x290], bl
jne 0x402ef1
lea eax, [ebp + 0x290]
push 0x40aa10
push eax
call sub.MSVCR90.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp + 0x290]
push eax
lea eax, [ebp - 0x7c]
push eax
call sub.MSVCR90.dll_strcpy
lea eax, [ebp + 0x290]
push eax
lea eax, [ebp + 0x18c]
push eax
call sub.MSVCR90.dll_strcpy
add esp, 0x10
lea eax, [ebp + 0x88]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp + 0x18c]
push eax
call fcn.00402ce1
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp + 0x290]
push eax
mov eax, dword [0x4091bc]
inc eax
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.00402cbb
pop ecx
push eax
call fcn.00402b9e
add esp, 0xc
test eax, eax
je 0x402f84
push 0x8000
lea eax, [ebp + 0x290]
push eax
mov dword [ebp - 0x80], 1
call dword [sym.imp.KERNEL32.dll__lopen]
mov esi, eax
cmp esi, ebx
jge 0x402f84
mov dword [ebp - 0x80], ebx
lea eax, [ebp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [ebp - 0x80], ebx
je 0x402e7c
jmp 0x402dac
or dword [0x409e38], 0xffffffff
jmp 0x402e61