Function at 0x4177d0
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x470492
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x4a5010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x244], eax
lea ecx, [ebp - 0x25c]
xorps xmm0, xmm0
push ecx
mov ecx, dword [eax + 0x494]
movq qword [ebp - 0x25c], xmm0
call fcn.00406ce0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x25c]
test edx, edx
sete al
or ebx, 0xffffffff
test al, al
jne 0x4181c5
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov byte [ebp - 4], 1
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x24c], edi
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x224], 0
cmp dword [eax + 0x14], 8
jb 0x41788a
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x224]
call fcn.00401980
mov byte [ebp - 4], 3
push dword [ebp - 0x224]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41816e
xorps xmm0, xmm0
lea ecx, [ebp - 0x290]
push 0x48ccd8
movq qword [ebp - 0x254], xmm0
call fcn.00401980
mov dword [ebp - 0x28c], 2
push 0x48cce0
lea ecx, [ebp - 0x288]
mov byte [ebp - 4], 4
call fcn.00401980
mov dword [ebp - 0x284], 0xd
push 0x48cce8
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 5
call fcn.00401980
mov dword [ebp - 0x27c], 0
push 0x48ccf0
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 6
call fcn.00401980
mov dword [ebp - 0x274], 0x19
lea eax, [ebp - 0x270]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x290]
push eax
push ecx
lea ecx, [ebp - 0x254]
call fcn.0041a8a0
push 0x401310
push 4
push 8
lea eax, [ebp - 0x290]
mov byte [ebp - 4], 9
push eax
call fcn.0043f55e
xor edi, edi
mov dword [ebp - 0x238], 0
xorps xmm0, xmm0
mov dword [ebp - 0x238], edi
movq qword [ebp - 0x240], xmm0
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x23c], edi
mov byte [ebp - 4], 0xa
mov ebx, dword [ebp - 0x254]
mov esi, dword [ebx]
cmp esi, ebx
je 0x417a45
or edi, 0xffffffff
mov ecx, dword [esi + 0x10]
sub ecx, 0x10
call fcn.00401e20
add eax, 0x10
mov dword [ebp - 0x230], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x240]
call fcn.0041abb0
mov byte [ebp - 4], 0xa
mov eax, edi
mov edx, dword [ebp - 0x230]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4179f7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [esi + 0xd], 0
jne 0x417a37
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x417a1c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x417a37
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x417a10
jmp 0x417a37
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x417a35
cmp esi, dword [eax + 8]
jne 0x417a35
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x417a25
mov esi, eax
cmp esi, ebx
jne 0x4179a3
mov edi, dword [ebp - 0x240]
push dword [ebp - 0x224]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov edx, eax
test edx, edx
jne 0x417a5b
xor ecx, ecx
jmp 0x417a6f
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417a60
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x220]
call fcn.00402560
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x24c]
call fcn.0041bc30
mov esi, dword [ebp - 0x220]
cmp dword [esi - 0xc], 0
jle 0x417cf2
push ecx
push 0
lea ecx, [ebp - 0x220]
call fcn.0041b330
mov esi, dword [ebp - 0x220]
mov ebx, dword [esi - 0xc]
test ebx, ebx
jns 0x417ac3
push 0x80070057
call fcn.00403340
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x417ae6
push ebx
lea ecx, [ebp - 0x220]
call fcn.004023a0
mov esi, dword [ebp - 0x220]
lea eax, [ebx + 1]
push eax
push esi
call fcn.0045c844
add esp, 8
cmp ebx, dword [esi - 8]
jg 0x417ab9
push dword [ebp - 0x268]
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
mov ecx, edi
mov ebx, dword [ebp - 0x23c]
lea eax, [ebp - 0x220]
push eax
mov edx, ebx
call fcn.0041e750
add esp, 8
cmp eax, ebx
jne 0x417cf2
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x228], 0
push eax
lea ecx, [ebp - 0x228]
call fcn.0041ada0
add esp, 4
mov byte [ebp - 4], 0xc
cmp edi, ebx
je 0x417cb6
or ebx, 0xffffffff
nop word [eax + eax]
mov dword [ebp - 0x21c], 0
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.00401e20
add eax, 0x10
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x264]
xorps xmm0, xmm0
push eax
mov ecx, 0x4a9d14
movq qword [ebp - 0x230], xmm0
call fcn.0041e220
mov eax, dword [ebp - 0x264]
push ecx
add eax, 0x14
lea ecx, [ebp - 0x230]
push eax
call fcn.0041da40
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402730
cmp eax, dword [ebp - 0x230]
je 0x417c0f
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 0x228]
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x417c06
test dx, dx
je 0x417c02
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x417c06
add ecx, 4
add eax, 4
test dx, dx
jne 0x417be0
xor eax, eax
jmp 0x417c0b
sbb eax, eax
or eax, 1
test eax, eax
jns 0x417c6a
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
push eax
push dword [eax]
lea eax, [ebp - 0x268]
push eax
call fcn.0041b5f0
push dword [ebp - 0x230]
call fcn.0043f53a
mov byte [ebp - 4], 0xc
add esp, 4
mov edx, dword [ebp - 0x21c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x417c59
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
cmp edi, dword [ebp - 0x23c]
jne 0x417b60
jmp 0x417cb9
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
push eax
push dword [eax]
lea eax, [ebp - 0x268]
push eax
call fcn.0041b5f0
push dword [ebp - 0x230]
call fcn.0043f53a
mov byte [ebp - 4], 0xc
add esp, 4
mov edx, dword [ebp - 0x21c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x417cd1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x417cd1
or ebx, 0xffffffff
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x240]
call fcn.0041abb0
mov esi, dword [ebp - 0x220]
mov byte [ebp - 4], 0xa
mov eax, ebx
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x417cf2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00458500
add esp, 0xc
lea ecx, [ebp - 0x270]
push 0x48c2c0
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::constructor_wchar_t_const__]
push 0x48ccf8
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 0xe
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::constructor_wchar_t_const__]
mov byte [ebp - 4], 0xf
call dword [sym.imp.soui.dll_public:_static_class_SOUI::SApplication____cdecl_SOUI::SSingleton_class_SOUI::SApplication_::getSingleton_void_]
mov ecx, eax
call dword [sym.imp.soui.dll_public:_struct_SOUI::ITranslatorMgr____thiscall_SOUI::SApplication::GetTranslator_void_]
lea ecx, [ebp - 0x270]
push ecx
lea ecx, [ebp - 0x26c]
mov edx, dword [eax]
push ecx
lea ecx, [ebp - 0x268]
push ecx
mov ecx, eax
call dword [edx + 0x20]
push 0
push eax
lea eax, [ebp - 0x22c]
mov byte [ebp - 4], 0x10
push eax
call dword [sym.imp.utilities.dll_public:_static_class_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits____cdecl_SOUI::SStrCpCvt::CvtW2W_class_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits__const___unsigned_int_]
add esp, 0xc
mov byte [ebp - 4], 0x11
mov ebx, dword [eax]
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x228], edi
mov byte [ebp - 4], 0x12
test ebx, ebx
je 0x417dd1
test ebx, 0xffff0000
jne 0x417dbb
movzx ebx, bx
mov ecx, ebx
call fcn.004031b0
test eax, eax
je 0x417de6
push ebx
push eax
lea ecx, [ebp - 0x228]
call fcn.00402300
jmp 0x417de0
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x417dc0
sub ecx, edx
sar ecx, 1
jmp 0x417dd3
xor ecx, ecx
push ecx
push ebx
lea ecx, [ebp - 0x228]
call fcn.00402560
mov edi, dword [ebp - 0x228]
lea ecx, [ebp - 0x22c]
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::destructor_void_]
lea ecx, [ebp - 0x268]
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::destructor_void_]
lea ecx, [ebp - 0x26c]
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::destructor_void_]
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 0x17
call dword [sym.imp.utilities.dll_public:_void___thiscall_SOUI::TStringT_wchar_t__struct_SOUI::wchar_traits_::destructor_void_]
lea eax, [ebp - 0x240]
mov dword [ebp - 0x234], 0
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00416850
mov byte [ebp - 4], 0x18
mov eax, dword [ebp - 0x234]
cmp dword [eax - 0xc], 1
jl 0x4180f5
mov eax, dword [ebp - 0x224]
cmp dword [eax - 4], 1
jle 0x417e6b
push dword [eax - 0xc]
lea ecx, [ebp - 0x224]
call fcn.004024e0
mov eax, dword [ebp - 0x224]
push eax
push 0x48cd08
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004217e0
mov ebx, dword [ebp - 0x244]
lea eax, [ebp - 0x2e4]
push 0x54
push 0
push eax
mov ebx, dword [ebx + 0x25c]
call fcn.00458500
lea eax, [ebp - 0x218]
mov dword [ebp - 0x2e8], 0x58
mov dword [ebp - 0x2cc], eax
add esp, 0x1c
mov eax, dword [ebp - 0x234]
mov dword [ebp - 0x2dc], eax
lea eax, [ebp - 0x2e8]
mov dword [ebp - 0x2e4], ebx
push eax
mov dword [ebp - 0x2c8], 0x104
mov dword [ebp - 0x2b4], 0x2000806
mov dword [ebp - 0x2b8], edi
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
test eax, eax
je 0x4180f5
mov ebx, dword [ebp - 0x2d0]
cmp ebx, 1
jb 0x4180f5
mov eax, dword [ebp - 0x23c]
sub eax, dword [ebp - 0x240]
sar eax, 2
cmp ebx, eax
ja 0x4180f5
lea eax, [ebp - 0x218]
mov dword [ebp - 0x21c], 0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00401980
mov byte [ebp - 4], 0x19
mov eax, dword [ebp - 0x240]
mov ecx, dword [eax + ebx*4 - 4]
sub ecx, 0x10
call fcn.00401e20
lea ebx, [eax + 0x10]
mov dword [ebp - 0x260], ebx
mov byte [ebp - 4], 0x1a
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], 1
jge 0x417ff7
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0x21c]
call fcn.0041bc30
lea ecx, [ebp - 0x21c]
call fcn.00401900
lea eax, [ebp - 0x21c]
mov edx, 0x48cadc
push eax
lea ecx, [ebp - 0x244]
call fcn.0041ae50
add esp, 4
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 0x1b
call fcn.0041bc30
mov byte [ebp - 4], 0x1a
or eax, 0xffffffff
mov edx, dword [ebp - 0x244]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x417fdd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x21c]
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0045c646
add esp, 0xc
mov ecx, esi
mov eax, ebx
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x418026
test dx, dx
je 0x418022
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x418026
add eax, 4
add ecx, 4
test dx, dx
jne 0x418000
xor eax, eax
jmp 0x41802b
sbb eax, eax
or eax, 1
test eax, eax
je 0x41809f
lea eax, [ebp - 0x260]
mov dword [ebp - 0x244], 0
push eax
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x254]
call fcn.0041a730
mov eax, dword [ebp - 0x244]
cmp eax, dword [ebp - 0x254]
je 0x41809f
mov edx, dword [ebp - 0x25c]
mov ecx, dword [eax + 0x14]
cmp ecx, dword [edx + 0x3c]
je 0x41809f
lea ecx, [ebp - 0x218]
add eax, 0x14
push ecx
push eax
lea eax, [ebp - 0x25c]
push eax
push ecx
lea ecx, [ebp - 0x248]
call fcn.0041d8b0
cmp dword [ebp - 0x244], 0
setne al
test al, al
je 0x4180b4
call fcn.00459ba2
push 0
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 0x19
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4180d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x18
mov eax, ebx
mov edx, dword [ebp - 0x21c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4180f8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4180f8
or ebx, 0xffffffff
mov byte [ebp - 4], 0x17
mov eax, ebx
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x418119
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x418134
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x240]
call fcn.00401a30
mov eax, dword [ebp - 0x254]
lea ecx, [ebp - 0x254]
push eax
push dword [eax]
lea eax, [ebp - 0x268]
push eax
call fcn.0041b5f0
push dword [ebp - 0x254]
call fcn.0043f53a
mov edi, dword [ebp - 0x24c]
add esp, 4
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41818f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4181aa
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4181c5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0x1c
mov esi, dword [ebp - 0x258]
test esi, esi
je 0x4181f4
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x4181f4
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x4181f4
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043f53f
mov esp, ebp
pop ebp
ret