Function at 0x40cb80
Capabilities:
Set current directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4d63f9
push eax
mov eax, dword [0x4fb830]
mov dword fs:[0], esp
sub esp, 0x250
test eax, eax
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ebx, 1
jne 0x40cbb6
mov ebx, dword [esp + 0x270]
mov eax, dword [ebp + 0x10]
mov esi, dword [sym.imp.user32.dll_SendMessageA]
push 0
push 8
push 0x110a
push eax
call esi
test eax, eax
jne 0x40cbdd
mov ecx, dword [ebp + 0x10]
push eax
push 9
push 0x110a
push ecx
call esi
mov edx, dword [ebp + 0x10]
push eax
push edx
call fcn.00404b60
mov esi, eax
add esp, 8
test esi, esi
je 0x40cecd
mov ecx, dword [esi + 4]
lea eax, [esp + 0x50]
push eax
push ecx
call dword [sym.imp.shell32.dll_SHGetPathFromIDList]
test eax, eax
je 0x40cecd
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.kernel32.dll_lstrlen]
mov byte [esp + eax + 0x51], 0
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x50]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x274]
test eax, eax
mov dword [esp + 0x34], 3
mov dword [esp + 0x38], ecx
mov word [esp + 0x40], 4
je 0x40cc5a
mov word [esp + 0x40], 0x44
test ebx, ebx
jne 0x40cc63
or byte [esp + 0x40], 0x10
mov edi, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push 0x4ee610
call edi
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.shell32.dll_SHFileOperation]
mov ebx, eax
lea eax, [ebp + 0x20c]
push eax
call edi
test ebx, ebx
jne 0x40cecd
lea ecx, [esp + 0x50]
push ebx
push ecx
call fcn.004c818e
add esp, 8
cmp eax, 0xffffffff
jne 0x40cecd
push 0x4e20
mov dword [esp + 0x14], 0x4d8784
mov dword [esp + 0x1c], 0x1388
call fcn.004c7e90
mov ecx, dword [esp + 0x1c]
mov edi, eax
xor eax, eax
mov dword [esp + 0x18], edi
rep stosd dword es:[edi], eax
add esp, 4
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x10], 0x4d8780
mov eax, dword [esi + 4]
lea edx, [esp + 0x158]
push edx
push eax
mov dword [esp + 0x270], ebx
mov dword [esp + 0x28], 1
call dword [sym.imp.shell32.dll_SHGetPathFromIDList]
test eax, eax
je 0x40ce47
lea ecx, [esp + 0x158]
push ecx
call fcn.00443d50
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x40ce47
push 0x14
call fcn.004c7e90
add esp, 4
mov dword [esp + 0x2c], eax
cmp eax, ebx
mov byte [esp + 0x268], 1
je 0x40cd52
push 0x4fbe40
push edi
mov ecx, eax
call fcn.0041c790
mov esi, eax
jmp 0x40cd54
xor esi, esi
push 0x4d872c
push edi
mov byte [esp + 0x270], 0
call dword [sym.imp.kernel32.dll_lstrcpy]
mov edx, dword [0x4fb820]
lea eax, [esp + 0x158]
push edx
push eax
lea ecx, [esp + 0x18]
call fcn.0041cc00
cmp esi, ebx
je 0x40ce47
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, esi
call fcn.0041ca10
mov edx, dword [esp + 0x14]
mov edi, dword [edx + eax*4]
cmp edi, ebx
je 0x40cdb2
push esi
mov ecx, edi
call fcn.0041c860
test eax, eax
jne 0x40cdb2
mov edi, dword [edi + 4]
cmp edi, ebx
jne 0x40cd9f
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
cmp edi, ebx
je 0x40ce47
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, edi
call fcn.0041ca10
mov edx, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
mov esi, dword [edx + eax*4]
test esi, esi
je 0x40ce27
push edi
mov ecx, esi
call fcn.0041c860
test eax, eax
jne 0x40cdf4
mov ebx, esi
mov esi, dword [esi + 4]
test esi, esi
jne 0x40cddd
jmp 0x40ce27
test esi, esi
je 0x40ce27
test ebx, ebx
je 0x40ce04
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
jmp 0x40ce13
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
mov dword [eax + ecx*4], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40ce23
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
dec dword [esp + 0x1c]
mov eax, dword [0x4fb820]
mov ecx, dword [0x4fb81c]
push eax
lea edx, [esp + 0x15c]
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.0041cdb0
xor ebx, ebx
mov eax, dword [ebp + 0x10]
mov esi, dword [sym.imp.user32.dll_SendMessageA]
push ebx
push ebx
push 0xb
push eax
call esi
push 1
push ebx
mov ecx, ebp
call fcn.00416d20
push ebx
mov ecx, ebp
call fcn.00418950
mov ecx, dword [ebp + 0x10]
push ebx
push 1
push 0xb
push ecx
call esi
mov eax, dword [esp + 0x20]
mov dword [esp + 0x268], 0xffffffff
cmp eax, ebx
mov dword [esp + 0x10], 0x4d8784
je 0x40cec0
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, ebx
jle 0x40cec0
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + edi*4]
cmp ecx, ebx
je 0x40ceb7
mov esi, dword [ecx + 4]
cmp ecx, ebx
je 0x40ceb1
mov eax, dword [ecx]
push 1
call dword [eax]
cmp esi, ebx
mov ecx, esi
jne 0x40cea4
mov eax, dword [esp + 0x18]
inc edi
cmp edi, eax
jl 0x40ce99
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004c7e56
add esp, 4
mov ecx, dword [esp + 0x260]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x25c
ret 8