Function at 0x412050
Capabilities:
Set current directory

Disassembly:
mov eax, dword [0x4eb340]
sub esp, 0x250
test eax, eax
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ebx, 1
jne 0x412071
mov ebx, dword [esp + 0x264]
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 0x412098
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.00404c10
mov esi, eax
add esp, 8
test esi, esi
je 0x412363
mov ecx, dword [esi + 4]
lea eax, [esp + 0x50]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x412363
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
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 + 0x268]
test eax, eax
mov dword [esp + 0x34], 3
mov dword [esp + 0x38], ecx
mov word [esp + 0x40], 4
je 0x412115
mov word [esp + 0x40], 0x44
test ebx, ebx
jne 0x41211e
or byte [esp + 0x40], 0x10
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x4e076c
call edi
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
mov ebx, eax
lea eax, [ebp + 0x20c]
push eax
call edi
test ebx, ebx
jne 0x412363
lea ecx, [esp + 0x50]
push ebx
push ecx
call fcn.004becfa
add esp, 8
cmp eax, 0xffffffff
jne 0x412363
push 0x4e20
mov dword [esp + 0x14], 0x4cc7c4
mov dword [esp + 0x1c], 0x1388
call fcn.004be967
mov ecx, dword [esp + 0x1c]
mov edi, eax
xor eax, eax
add esp, 4
mov dword [esp + 0x14], edi
lea edx, [esp + 0x158]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 4]
push edx
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], 0x4cc7c0
mov dword [esp + 0x28], 1
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4122e8
lea ecx, [esp + 0x158]
push ecx
call fcn.0044b3b0
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x4122e8
push 0x14
call fcn.004be967
add esp, 4
cmp eax, ebx
je 0x4121fa
push 0x4eb858
push edi
mov ecx, eax
call fcn.00422ed0
mov esi, eax
jmp 0x4121fc
xor esi, esi
push 0x4cc76c
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [0x4eb330]
lea eax, [esp + 0x158]
push edx
push eax
lea ecx, [esp + 0x18]
call fcn.00423340
cmp esi, ebx
je 0x4122e8
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, esi
call fcn.00423150
mov edx, dword [esp + 0x14]
mov edi, dword [edx + eax*4]
cmp edi, ebx
je 0x412252
push esi
mov ecx, edi
call fcn.00422fc0
test eax, eax
jne 0x412252
mov edi, dword [edi + 4]
cmp edi, ebx
jne 0x41223f
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
cmp edi, ebx
je 0x4122e8
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, edi
call fcn.00423150
mov edx, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
mov esi, dword [edx + eax*4]
test esi, esi
je 0x4122c7
push edi
mov ecx, esi
call fcn.00422fc0
test eax, eax
jne 0x412294
mov ebx, esi
mov esi, dword [esi + 4]
test esi, esi
jne 0x41227d
jmp 0x4122c7
test esi, esi
je 0x4122c7
test ebx, ebx
je 0x4122a4
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
jmp 0x4122b3
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
mov dword [ecx + edx*4], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4122c3
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
dec dword [esp + 0x1c]
mov ecx, dword [0x4eb330]
mov edx, dword [0x4eb32c]
push ecx
lea eax, [esp + 0x15c]
push edx
push eax
lea ecx, [esp + 0x1c]
call fcn.004234e0
xor ebx, ebx
mov ecx, dword [ebp + 0x10]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push ebx
push 0xb
push ecx
call esi
push 1
push ebx
mov ecx, ebp
call fcn.0041ce90
push ebx
mov ecx, ebp
call fcn.0041ec00
mov edx, dword [ebp + 0x10]
push ebx
push 1
push 0xb
push edx
call esi
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], 0x4cc7c4
cmp eax, ebx
je 0x412356
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, ebx
jle 0x412356
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + edi*4]
cmp ecx, ebx
je 0x41234d
mov esi, dword [ecx + 4]
cmp ecx, ebx
je 0x412347
mov edx, dword [ecx]
push 1
call dword [edx]
cmp esi, ebx
mov ecx, esi
jne 0x41233a
mov eax, dword [esp + 0x18]
inc edi
cmp edi, eax
jl 0x41232f
mov eax, dword [esp + 0x14]
push eax
call fcn.004be975
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x250
ret 8