Function at 0x471500
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6e8e66
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
push ebx
push esi
push edi
mov edi, ecx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
lea ebx, [edi + 0xc0]
call fcn.004709c0
mov edx, dword [ebx + 4]
mov ecx, dword [eax + 4]
mov dword [eax + 4], edx
mov dword [ebx + 4], ecx
mov edx, dword [ebx + 8]
mov ecx, dword [eax + 8]
mov dword [eax + 8], edx
mov dword [ebx + 8], ecx
mov edx, dword [ebx + 0xc]
mov ecx, dword [eax + 0xc]
mov dword [eax + 0xc], edx
mov dword [ebx + 0xc], ecx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00407e50
mov al, byte [ebp - 0x19]
push 0
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call fcn.00407e50
mov edx, ebx
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 3
call fcn.00471950
mov edx, dword [ebp - 0x2c]
mov ecx, dword [eax + 4]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [eax + 8]
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
mov ecx, dword [eax + 0xc]
mov dword [eax + 0xc], edx
mov dword [ebp - 0x24], ecx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 3
call fcn.00407e50
lea edx, [ebp - 0x30]
mov ecx, ebx
call fcn.00470cc0
push 0x3c
call fcn.00652710
mov ecx, eax
add esp, 4
mov dword [ebp - 0x20], ecx
test ecx, ecx
mov byte [ebp - 4], 6
je 0x4715e6
push edi
call fcn.00470440
jmp 0x4715e8
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], eax
push str.Heroes_of_Might_and_Magic_IV_Campaign_Editor_adventure_object_clipboard_format
mov byte [ebp - 4], 7
call dword [sym.imp.USER32.dll_RegisterClipboardFormatA]
mov esi, eax
test esi, esi
jne 0x47162a
mov ecx, 0x8345f0
call fcn.00461f40
push eax
lea ecx, [ebp - 0x8c]
call fcn.0041f410
lea eax, [ebp - 0x8c]
push 0x788fc8
push eax
call fcn.006609b5
mov ecx, esi
call fcn.005eb860
mov ecx, esi
call fcn.0041f130
push 0x1f
mov edx, 0x3e0
mov ecx, 0x7c00
call fcn.00496720
call fcn.00471260
call fcn.006d9d38
push 0
call fcn.00658ad2
add esp, 4
mov ecx, edi
call fcn.006d9bf2
push 0x7e4b3c
mov ecx, edi
call fcn.006d889b
mov eax, dword [edi + 0x90]
test eax, eax
je 0x471683
push eax
call fcn.00652870
add esp, 4
push str.Heroes_of_Might_and_Magic_IV_Campaign_Editor
call fcn.00661c5e
add esp, 4
mov ecx, edi
mov dword [edi + 0x90], eax
push 4
call fcn.006d93a4
push 0x2dc
call fcn.00652710
mov ecx, eax
add esp, 4
mov dword [ebp - 0x18], ecx
test ecx, ecx
mov byte [ebp - 4], 8
je 0x4716c9
lea edx, [ebp - 0x30]
push edx
push 0x80
call fcn.005cb610
jmp 0x4716cb
xor eax, eax
mov ecx, dword [edi + 0xd0]
mov byte [ebp - 4], 7
test ecx, ecx
mov dword [edi + 0xd0], eax
je 0x4716e6
mov eax, dword [ecx]
push 1
call dword [eax + 4]
push 0x90
call fcn.00652710
mov esi, eax
add esp, 4
mov dword [ebp - 0x4c], esi
test esi, esi
mov byte [ebp - 4], 9
je 0x471735
mov ecx, dword [edi + 0xd0]
push 0x723d08
push 0x724460
mov dword [ebp - 0x18], ecx
push 0x722d60
push 0x81
mov ecx, esi
call fcn.006c8ba4
mov edx, dword [ebp - 0x18]
mov dword [esi], vtable.t_campaign_doc_template.0
mov dword [esi + 0x8c], edx
jmp 0x471737
xor esi, esi
push esi
mov ecx, edi
mov byte [ebp - 4], 7
call fcn.006cac7f
mov ecx, dword [edi + 0xd0]
push 1
mov dword [edi + 0x1c], ecx
call fcn.006c21b4
mov ecx, edi
call fcn.006d9bab
push 0
mov ecx, edi
call fcn.006d9bd5
mov eax, dword [edi + 0x74]
mov ecx, dword [edi + 0x1c]
push eax
call fcn.006c2a3a
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
lea ecx, [ebp - 0x70]
call fcn.006d9473
lea edx, [ebp - 0x70]
mov ecx, edi
push edx
mov byte [ebp - 4], 0xa
call fcn.006d9420
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x4717cc
push str.maps
lea ecx, [ebp - 0x40]
push ebx
push ecx
call fcn.0046e7a0
mov eax, dword [eax + 4]
add esp, 0xc
test eax, eax
jne 0x4717bb
mov eax, 0x71eb04
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 1
lea ecx, [ebp - 0x40]
call fcn.00407e50
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x20], 0
test ecx, ecx
je 0x4717e1
mov edx, dword [ecx]
push 1
call dword [edx + 4]
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
call fcn.006d9859
test eax, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x70]
jne 0x47181d
call fcn.006d94ce
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00407e50
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.006d94ce
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x471859
mov al, byte [ecx - 1]
test al, al
je 0x47184f
cmp al, 0xff
je 0x47184f
dec al
mov byte [ecx - 1], al
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
dec ecx
push ecx
call fcn.00652870
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret