Function at 0x4012f0
Capabilities:
Copy file
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x50e9de
mov eax, dword fs:[0]
push eax
sub esp, 0x400
mov eax, dword [0x564020]
xor eax, esp
mov dword [esp + 0x3f8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x564020]
xor eax, esp
push eax
lea eax, [esp + 0x414]
mov dword fs:[0], eax
mov eax, dword [esp + 0x424]
mov edi, ecx
cmp edi, 1
jne 0x40133e
cmp eax, 9
je 0x401350
cmp edi, 2
jne 0x401589
cmp eax, 5
jne 0x401589
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov dword [esp + 0x41c], 0
call fcn.00408770
lea esi, [esp + 0x98]
test al, al
je 0x40137f
call fcn.0040d110
jmp 0x401384
call fcn.0040d070
lea eax, [esp + 0xb4]
push eax
call fcn.0040e050
mov byte [esp + 0x41c], 1
cmp dword [esp + 0xb0], 8
jb 0x401550
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x4013b7
cmp edi, 1
je 0x4013c0
cmp edi, 2
jne 0x40155c
mov dword [esp + 0x224], edi
push eax
lea edi, [esp + 0xb8]
mov dword [esp + 0x200], 0x1a
call fcn.0040e140
mov ecx, 8
mov esi, str.WindowMenusLanMapSelectMenu.wnd
lea edi, [esp + 0x22c]
rep movsd dword es:[edi], dword [esi]
push 0x56
lea edx, [esp + 0x252]
push 0
push edx
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_memset
mov ecx, 7
mov esi, str.WindowMenusMapSelectMenu.wnd
lea edi, [esp + 0x2b0]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
movsw word es:[edi], word [esi]
push 0x59
lea eax, [esp + 0x2c7]
push 0
push eax
movsb byte es:[edi], byte [esi]
call sub.MSVCR90.dll_memset
mov ecx, 9
mov esi, str.WindowMenusSkirmishMapSelectMenu.wnd
lea edi, [esp + 0x328]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
movsw word es:[edi], word [esi]
push 0x51
lea ecx, [esp + 0x347]
push 0
push ecx
movsb byte es:[edi], byte [esi]
call sub.MSVCR90.dll_memset
mov ecx, 8
mov esi, str.WindowMenusWOLMapSelectMenu.wnd
lea edi, [esp + 0x3a0]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
push 0x56
lea edx, [esp + 0x3ba]
push 0
push edx
movsw word es:[edi], word [esi]
call sub.MSVCR90.dll_memset
mov ebx, dword [sym.imp.MSVCR90.dll_tolower]
add esp, 0xc
lea edi, [esp + 0x22c]
mov dword [esp + 0x20], 4
lea ebx, [ebx]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4014a5
sub eax, edx
lea ebp, [edi + eax]
mov esi, edi
cmp edi, ebp
je 0x4014c7
movsx eax, byte [esi]
push eax
call ebx
mov byte [esi], al
inc esi
add esp, 4
cmp esi, ebp
jne 0x4014b7
add edi, 0x78
sub dword [esp + 0x20], 1
jne 0x4014a0
xor ebp, ebp
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0xbc]
mov dword [esp + 0x224], ebp
mov dword [esp + 0x228], 0xffffffff
call fcn.0040eeb0
lea ecx, [esp + 0x30]
push ecx
mov edi, eax
mov dword [esp + 0x24], ebp
call fcn.00402750
mov byte [esp + 0x41c], 2
cmp edi, ebp
je 0x4016a5
lea esi, [esp + 0x22c]
mov dword [esp + 0x28], 4
mov ebx, 1
mov ecx, esi
mov eax, edi
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401590
test dl, dl
je 0x40154c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401590
add eax, 2
add ecx, 2
test dl, dl
jne 0x401530
xor eax, eax
jmp 0x401595
lea eax, [esp + 0x9c]
jmp 0x4013b2
lea ecx, [esp + 0xb4]
push ecx
mov byte [esp + 0x420], 0
call fcn.0040e0d0
lea ecx, [esp + 0x98]
mov dword [esp + 0x41c], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor al, al
jmp 0x401d64
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401606
add dword [esp + 0x20], ebx
lea ecx, [esp + 0xb4]
call fcn.00401eb0
test al, al
je 0x401606
mov ecx, dword [esp + 0x214]
mov ebx, dword [esp + 0x210]
sub ecx, ebx
mov eax, 0xb21642c9
imul ecx
mov eax, dword [esp + 0x21c]
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
inc ebp
cmp eax, ecx
jae 0x4015e3
imul eax, eax, 0x5c
add eax, ebx
jmp 0x4015e5
xor eax, eax
mov dword [esp + 0x14], eax
test eax, eax
je 0x401606
cmp byte [eax + 0x58], 0
je 0x401606
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x74]
push eax
lea ebx, [esp + 0x38]
call fcn.004024e0
mov ebx, 1
add esi, 0x78
sub dword [esp + 0x28], ebx
jne 0x401528
cmp dword [esp + 0x20], 4
je 0x4016a5
mov ecx, dword [esp + 0x214]
sub ecx, dword [esp + 0x210]
mov eax, 0xb21642c9
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x21c]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x4016a5
mov eax, dword [esp + 0x220]
add eax, ebx
push eax
mov dword [esp + 0x224], eax
push ecx
lea eax, [esp + 0xbc]
call fcn.0040eeb0
test eax, eax
jne 0x40169b
mov eax, dword [esp + 0x21c]
add eax, ebx
push 0xffffffffffffffff
mov dword [esp + 0x220], eax
push eax
lea eax, [esp + 0xbc]
mov dword [esp + 0x228], 0xffffffff
call fcn.0040eeb0
mov edi, eax
test edi, edi
jne 0x401514
test ebp, ebp
setne bl
mov byte [esp + 0x1f], bl
test bl, bl
je 0x401c9a
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x30]
mov eax, dword [ecx]
mov dword [esp + 0x14], edi
mov ebp, eax
mov esi, dword [esp + 0x48]
test edi, edi
je 0x4016d4
cmp edi, dword [esp + 0x30]
je 0x4016de
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
call ebx
jmp 0x4016e4
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp ebp, esi
je 0x4018d9
test edi, edi
jne 0x401722
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x18]
jne 0x4016fb
call ebx
mov esi, dword [ebp + 0xc]
push str..bak
lea edx, [esp + 0x80]
push esi
push edx
call dword [sym.imp.MSVCP90.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___wchar_t_const__]
add esp, 0xc
cmp dword [esi + 0x18], 8
lea edi, [esi + 4]
jb 0x401726
mov eax, dword [edi]
jmp 0x401728
mov eax, dword [edi]
jmp 0x4016f4
mov eax, edi
push 4
push eax
call dword [sym.imp.MSVCR90.dll__waccess_s]
add esp, 8
cmp eax, 0x16
ja case.0x401740.1
movzx eax, byte [eax + 0x401da0]
jmp dword [eax*4 + 0x401d8c]
xor eax, eax
jmp 0x401765
mov eax, 1
jmp 0x401765
mov eax, 2
jmp 0x401765
mov eax, 3
jmp 0x401765
mov eax, 4
test eax, eax
mov eax, dword [esp + 0x80]
sete bl
cmp dword [esp + 0x94], 8
jae 0x401782
lea eax, [esp + 0x80]
push 0
push eax
call dword [sym.imp.MSVCR90.dll__waccess_s]
add esp, 8
cmp eax, 0x16
ja case.0x40179a.1
movzx ecx, byte [eax + 0x401dcc]
jmp dword [ecx*4 + 0x401db8]
xor eax, eax
jmp 0x4017bf
mov eax, 1
jmp 0x4017bf
mov eax, 2
jmp 0x4017bf
mov eax, 3
jmp 0x4017bf
mov eax, 4
cmp dword [esi + 0x14], 0
je 0x401862
cmp dword [esp + 0x90], 0
je 0x401862
test bl, bl
je 0x401862
test eax, eax
je 0x401862
mov ecx, dword [esp + 0x80]
mov eax, 8
cmp dword [esp + 0x94], eax
jae 0x4017ff
lea ecx, [esp + 0x80]
cmp dword [esi + 0x18], eax
jb 0x401808
mov eax, dword [edi]
jmp 0x40180a
mov eax, edi
push ecx
push eax
push str.Copy__ls__nTo____ls_n
call fcn.004114d0
mov ecx, dword [esp + 0x8c]
mov eax, 8
add esp, 0xc
cmp dword [esp + 0x94], eax
jae 0x401835
lea ecx, [esp + 0x80]
cmp dword [esi + 0x18], eax
jb 0x40183e
mov eax, dword [edi]
jmp 0x401840
mov eax, edi
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x401855
push str.Copy_complete_n
jmp 0x40185a
push str.Copy_failed_n
call fcn.004114d0
add esp, 4
lea ecx, [esp + 0x7c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x14], 0
jne 0x401879
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp byte [ebp + 0x11], 0
je 0x40188e
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [esp + 0x14]
jmp 0x4016c6
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x11], 0
jne 0x4018b5
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
jne 0x4018aa
nop
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
je 0x4018a0
mov edi, dword [esp + 0x14]
mov ebp, ecx
jmp 0x4016c6
mov eax, dword [ebp + 4]
cmp byte [eax + 0x11], 0
jne 0x4018d0
mov edi, edi
cmp ebp, dword [eax + 8]
jne 0x4018d0
mov ebp, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x11], 0
je 0x4018c0
mov edi, dword [esp + 0x14]
jmp 0x4016c4
lea edx, [esp + 0x50]
push edx
call fcn.00402ab0
mov byte [esp + 0x41c], 3
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x30]
mov ebp, dword [eax]
mov dword [esp + 0x14], esi
lea esp, [esp]
mov edi, dword [esp + 0x48]
test esi, esi
je 0x40190e
cmp esi, dword [esp + 0x30]
je 0x401910
call ebx
cmp ebp, edi
je 0x401a25
test esi, esi
jne 0x401937
call ebx
cmp ebp, dword [esi + 0x18]
jne 0x401925
call ebx
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 8
jb 0x40193b
mov ecx, dword [eax + 4]
mov dword [esp + 0x20], ecx
jmp 0x401942
mov esi, dword [esi]
jmp 0x40191e
add eax, 4
mov dword [esp + 0x20], eax
mov ebx, dword [esp + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
mov esi, edi
and esi, 0xfffffffe
cmp edi, esi
je 0x4019a2
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4019a2
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4019ca
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp ebp, dword [eax + 0x18]
jne 0x40197f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
lea eax, [ebp + 0xc]
push eax
lea ebx, [esp + 0x54]
call fcn.004025e0
mov edx, dword [esp + 0x20]
push esi
push edi
push edx
push str.Change_file_attributes_for__ls_nFrom_0x_.8X_nTo___0x_.8X_n
mov dword [eax], edi
call fcn.004114d0
add esp, 0x10
cmp dword [esp + 0x14], 0
jne 0x4019af
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp byte [ebp + 0x11], 0
je 0x4019ce
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
jmp 0x401900
mov eax, dword [eax]
jmp 0x401974
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x11], 0
jne 0x4019fb
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
jne 0x4019ea
nop
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
je 0x4019e0
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebp, ecx
jmp 0x401900
mov eax, dword [ebp + 4]
cmp byte [eax + 0x11], 0
jne 0x401a14
cmp ebp, dword [eax + 8]
jne 0x401a14
mov ebp, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x11], 0
je 0x401a04
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebp, eax
jmp 0x401900
push str.Write_out_pending_file_changes_._._._n
call fcn.004114d0
add esp, 4
lea ecx, [esp + 0xb4]
call fcn.00409c90
test al, al
je 0x401af6
push str.Write_out_complete_n
call fcn.004114d0
add esp, 4
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x30]
mov ebp, dword [ecx]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x48]
test esi, esi
je 0x401a6f
cmp esi, dword [esp + 0x30]
je 0x401a71
call ebx
cmp ebp, edi
je 0x401c78
test esi, esi
jne 0x401bae
call ebx
cmp ebp, dword [esi + 0x18]
jne 0x401a8a
call ebx
lea esi, [ebp + 0xc]
push esi
lea edx, [esp + 0x24]
push edx
lea edi, [esp + 0x58]
call fcn.00402690
mov ebx, dword [eax]
mov eax, dword [eax + 4]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x2c], eax
test ebx, ebx
je 0x401ab3
cmp ebx, dword [esp + 0x50]
je 0x401ab9
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp dword [esp + 0x2c], edi
je 0x401bf6
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x401bb5
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp ebp, dword [eax + 0x18]
jne 0x401ae2
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [esi]
cmp dword [eax + 0x18], 8
jb 0x401bbc
mov edi, dword [eax + 4]
jmp 0x401bbf
push str.Write_out_failed._n
call fcn.004114d0
mov eax, dword [esp + 0x4c]
mov esi, dword [eax]
mov ebp, dword [esp + 0x34]
add esp, 4
lea ecx, [ecx]
mov edi, dword [esp + 0x48]
test ebp, ebp
je 0x401b1e
cmp ebp, dword [esp + 0x30]
je 0x401b20
call ebx
cmp esi, edi
je 0x401a53
test ebp, ebp
jne 0x401b45
call ebx
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x401b37
call ebx
mov eax, dword [esi + 0xc]
cmp dword [eax + 0x18], 8
jb 0x401b4a
mov eax, dword [eax + 4]
jmp 0x401b4d
mov eax, dword [ebp]
jmp 0x401b30
add eax, 4
push eax
push str.Is__ls_write_protected__n
call fcn.004114d0
add esp, 8
test ebp, ebp
jne 0x401b61
call ebx
cmp byte [esi + 0x11], 0
je 0x401b6b
call ebx
jmp 0x401b10
mov ecx, dword [esi + 8]
cmp byte [ecx + 0x11], 0
jne 0x401b8e
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
jne 0x401b8a
lea esp, [esp]
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
je 0x401b80
mov esi, ecx
jmp 0x401b10
mov eax, dword [esi + 4]
cmp byte [eax + 0x11], 0
jne 0x401ba7
cmp esi, dword [eax + 8]
jne 0x401ba7
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x11], 0
je 0x401b97
mov esi, eax
jmp 0x401b10
mov esi, dword [esi]
jmp 0x401a83
mov eax, dword [eax]
jmp 0x401ad7
lea edi, [eax + 4]
test ebx, ebx
jne 0x401c1e
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x2c]
cmp ecx, dword [ebx + 0x18]
jne 0x401bd8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [esp + 0x2c]
mov esi, dword [edx + 0x10]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push edi
push str.Restore_file_attributes_for__ls_nTo___0x_.8X_n
call fcn.004114d0
add esp, 0xc
cmp dword [esp + 0x14], 0
jne 0x401c03
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp byte [ebp + 0x11], 0
je 0x401c22
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
jmp 0x401a61
mov ebx, dword [ebx]
jmp 0x401bc9
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x11], 0
jne 0x401c4e
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
jne 0x401c3d
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x11], 0
je 0x401c33
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebp, ecx
jmp 0x401a61
mov eax, dword [ebp + 4]
cmp byte [eax + 0x11], 0
jne 0x401c67
cmp ebp, dword [eax + 8]
jne 0x401c67
mov ebp, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x11], 0
je 0x401c57
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebp, eax
jmp 0x401a61
lea esi, [esp + 0x50]
mov byte [esp + 0x41c], 4
call fcn.00402d00
mov eax, dword [esp + 0x50]
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
mov bl, byte [esp + 0x23]
add esp, 4
lea esi, [esp + 0x30]
mov byte [esp + 0x41c], 5
call fcn.00402a00
mov ecx, dword [esp + 0x30]
push ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0xb4]
mov byte [esp + 0x41c], 7
call fcn.00409c90
lea edx, [esp + 0x204]
mov dword [esp + 0x14], edx
mov byte [esp + 0x41c], 8
mov eax, dword [esp + 0x210]
xor ecx, ecx
cmp eax, ecx
je 0x401d10
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x214]
push ecx
push eax
call fcn.0040ff10
mov edx, dword [esp + 0x218]
push edx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 0xc
xor ecx, ecx
mov eax, dword [esp + 0x204]
push eax
mov dword [esp + 0x214], ecx
mov dword [esp + 0x218], ecx
mov dword [esp + 0x21c], ecx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0xb4]
push ecx
mov byte [esp + 0x420], 0
call fcn.004089f0
lea ecx, [esp + 0x98]
mov dword [esp + 0x41c], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov al, bl
mov ecx, dword [esp + 0x414]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3f8]
xor ecx, esp
call fcn.00419fc4
add esp, 0x40c
ret