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

Disassembly:
push ebp
mov ebp, esp
lea edx, [ebp - 0x18]
push edi
mov edi, 0xffffffff
push esi
push ebx
sub esp, 0x28c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24c], edx
mov dword [ebp - 0x244], esp
mov dword [ebp - 0x270], eax
mov eax, 0x408ad0
mov dword [ebp - 0x254], eax
mov eax, 0x4168b2
mov dword [ebp - 0x250], eax
mov eax, 0x402936
mov dword [ebp - 0x248], eax
lea eax, [ebp - 0x26c]
mov dword [esp], eax
call fcn.0040c1f0
mov dword [esp], str.addCluster:__s
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x268], edi
mov dword [esp + 4], eax
call fcn.004056d0
mov edx, dword [ebp - 0x270]
lea eax, [ebp - 0x128]
mov edx, dword [edx + 4]
mov byte [ebp - 0x128], 0
mov dword [esp + 4], eax
mov dword [ebp - 0x274], edx
mov dword [esp], 0x104
call sub.KERNEL32.dll_GetCurrentDirectoryA
sub esp, 8
test eax, eax
je 0x402901
cmp eax, 0x104
ja 0x4028e5
mov eax, dword [ebp - 0x274]
mov edx, 0xffffffff
mov dword [ebp - 0x268], edx
mov dword [esp], eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
test eax, eax
je 0x4029b0
mov esi, esi
lea edi, [edi]
mov eax, 0x105
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x238]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, 0x104
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], eax
lea eax, [ebp - 0x238]
mov dword [esp], eax
mov eax, 1
mov dword [esp + 4], edx
mov dword [ebp - 0x268], eax
call sub.msvcrt.dll_strncpy
mov edi, 0x104
lea edx, [ebp - 0x238]
mov dword [esp + 4], edi
mov dword [esp], edx
call fcn.00405180
test al, al
je 0x402921
mov edx, dword [ebp - 0x270]
add edx, 0x18
mov dword [ebp - 0x278], edx
mov edx, dword [ebp - 0x270]
mov eax, dword [edx + 0x18]
mov eax, dword [eax - 0xc]
test eax, eax
mov dword [ebp - 0x27c], eax
je 0x402868
mov eax, dword [0x41a260]
mov esi, dword [ebp - 0x27c]
sub eax, esi
cmp eax, 1
jae 0x402823
mov dword [esp], 0x41942b
mov ebx, 1
mov dword [ebp - 0x268], ebx
call fcn.00409bd0
xor edx, edx
mov eax, dword [ebp - 0x27c]
mov ecx, 1
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x278]
mov dword [esp + 4], eax
mov eax, 1
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov dword [ebp - 0x268], eax
call fcn.00415528
mov edx, dword [ebp - 0x270]
mov eax, dword [edx + 0x18]
mov edx, dword [ebp - 0x27c]
mov byte [eax + edx], 0x3b
mov dword [esp], str.Adding_cluster__s
lea eax, [ebp - 0x238]
mov dword [esp + 4], eax
mov eax, 1
mov dword [ebp - 0x268], eax
call fcn.004056d0
mov edx, dword [ebp - 0x270]
lea eax, [ebp - 0x238]
mov dword [esp], eax
add edx, 0x18
mov dword [ebp - 0x280], edx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x280]
lea edx, [ebp - 0x238]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00413c88
cmp byte [ebp - 0x128], 0
jne 0x4029e4
lea eax, [ebp - 0x26c]
mov dword [esp], eax
call fcn.0040c2d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.Failed_to_get_current_directory__buffer_is_too_small.
mov ecx, 0xffffffff
mov dword [ebp - 0x268], ecx
call fcn.004056d0
jmp 0x402770
mov dword [esp], 1
mov esi, str.Failed_to_get_current_directory
xor ebx, ebx
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
call fcn.00405820
jmp 0x402770
mov dword [esp], str.Invalid_cluster_path:__s
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
call fcn.004056d0
jmp 0x4028c2
mov dword [esp], 1
mov edx, dword [ebp - 0x274]
mov eax, str.Failed_to_set_current_directory_to___s_
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call fcn.00405820
mov byte [ebp - 0x128], 0
jmp 0x402770
lea edx, [ebp - 0x128]
mov edi, 0xffffffff
mov dword [esp], edx
mov dword [ebp - 0x268], edi
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
test eax, eax
jne 0x4028cf
mov dword [esp], 1
lea eax, [ebp - 0x128]
mov esi, str.Failed_to_set_current_directory_to___s_
mov dword [esp + 0xc], eax
mov ebx, 1
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
call fcn.00405820
jmp 0x4028cf