Function at 0x4776c6
Capabilities:
Check if file exists
Copy file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0xc8
push ebx
push esi
push edi
lea ecx, [ebp - 4]
call fcn.0046ce1e
lea ecx, [ebp - 0x1c]
call fcn.00473420
lea eax, [ebp - 0x1c]
push eax
mov ecx, 0x4fa998
call fcn.00477670
test al, al
jne 0x477722
lea ecx, [ebp - 0x1c]
call fcn.00476e23
push dword [ebp - 0x1c]
call fcn.00493cb0
pop ecx
lea ecx, [ebp - 4]
call fcn.00476e8c
push dword [ebp - 4]
call fcn.00493cb0
pop ecx
xor al, al
pop edi
pop esi
pop ebx
add ebp, 0x78
leave
ret
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0xc]
lea ecx, [ebp + 0x60]
call fcn.004155d0
mov eax, dword [ebp + 0x60]
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x64]
mov dword [ebp + 0x44], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
lea ecx, [ebp + 0x60]
call fcn.004155d0
mov eax, dword [ebp + 0x60]
mov dword [ebp + 0x4c], eax
mov eax, dword [ebp + 0x64]
mov dword [ebp + 0x50], eax
lea eax, [ebp + 0x40]
push eax
lea ecx, [ebp + 0x4c]
call fcn.0047065d
mov esi, 0x4fc0d8
jmp 0x4777d7
push ecx
mov ecx, esp
push esi
call fcn.00418850
lea ecx, [ebp + 0x4c]
call fcn.00475d48
cmp dword [eax + 0x18], 8
jb 0x477787
mov eax, dword [eax + 4]
jmp 0x47778a
add eax, 4
push eax
lea eax, [ebp + 0x34]
push eax
call fcn.0047634c
add esp, 0xc
push eax
lea ecx, [ebp + 0x60]
call fcn.00476d05
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 4]
call fcn.00476c12
lea ecx, [ebp + 0x60]
call fcn.004760c1
mov ecx, dword [ebp + 0x38]
add ecx, 0xfffffff0
call fcn.00404d30
lea ecx, [ebp + 0x4c]
call fcn.00475d74
lea eax, [ebp + 0x40]
push eax
lea ecx, [ebp + 0x4c]
call fcn.0047065d
test al, al
je 0x47776b
lea ecx, [ebp - 0x1c]
call fcn.00476e23
push dword [ebp - 0x1c]
call fcn.00493cb0
pop ecx
lea ecx, [ebp - 0x50]
call fcn.004270e0
lea eax, [ebp - 0x50]
push eax
push str.font
mov ecx, 0x4fa9d4
call fcn.00477497
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x38]
lea ecx, [ebp + 0x40]
call fcn.0040a920
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x60], eax
mov eax, dword [ebp + 0x44]
mov dword [ebp + 0x64], eax
lea eax, [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x38]
push dword [eax]
lea ecx, [ebp + 0x40]
call fcn.0040a920
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x44]
mov dword [ebp + 0x20], eax
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp + 0x1c]
call fcn.00409fa0
xor ebx, ebx
jmp 0x477ad3
push esi
lea ecx, [ebp + 0x48]
call fcn.00418850
push esi
lea ecx, [ebp + 0x30]
call fcn.00418850
push esi
lea ecx, [ebp + 0x5c]
call fcn.00418850
lea ecx, [ebp + 0x1c]
mov dword [ebp + 0x58], ebx
mov dword [ebp + 0x3c], ebx
call fcn.00428290
mov edi, eax
lea eax, [ebp + 0x24]
push eax
add edi, 4
push 0x4cd85c
lea eax, [ebp + 0x68]
push eax
mov ecx, edi
mov dword [ebp + 0x24], ebx
call fcn.00404140
jmp 0x4779ab
lea eax, [ebp + 0x28]
push eax
push 0x4cd960
lea eax, [ebp + 0x74]
push eax
lea ecx, [ebp + 0x68]
mov dword [ebp + 0x28], ebx
call fcn.00404140
mov eax, dword [ebp + 0x74]
cmp dword [eax - 0xc], ebx
je 0x477978
mov eax, dword [ebp + 0x68]
mov eax, dword [eax - 0xc]
sub eax, dword [ebp + 0x28]
lea ecx, [ebp + 0x68]
push eax
push dword [ebp + 0x28]
lea eax, [ebp + 0x6c]
push eax
call fcn.004042b0
push 0x4cd958
lea ecx, [ebp + 0x74]
call fcn.00405640
test eax, eax
jne 0x4778ef
lea ecx, [ebp + 0x48]
jmp 0x477919
push str.ui_language
lea ecx, [ebp + 0x74]
call fcn.00405640
test eax, eax
jne 0x477905
lea ecx, [ebp + 0x30]
jmp 0x477919
push str.font
lea ecx, [ebp + 0x74]
call fcn.00405640
test eax, eax
jne 0x477924
lea ecx, [ebp + 0x5c]
lea eax, [ebp + 0x6c]
push eax
call fcn.00404570
jmp 0x47796d
push str.os_prime_langid
lea ecx, [ebp + 0x74]
call fcn.00405640
test eax, eax
jne 0x477948
push 0x10
push ebx
push dword [ebp + 0x6c]
call fcn.0049a0f1
movzx eax, ax
mov dword [ebp + 0x58], eax
jmp 0x47796a
push str.os_sub_langid
lea ecx, [ebp + 0x74]
call fcn.00405640
test eax, eax
jne 0x47796d
push 0x10
push ebx
push dword [ebp + 0x6c]
call fcn.0049a0f1
movzx eax, ax
mov dword [ebp + 0x3c], eax
add esp, 0xc
mov ecx, dword [ebp + 0x6c]
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp + 0x24]
push eax
push 0x4cd85c
lea eax, [ebp + 0x50]
push eax
mov ecx, edi
call fcn.00404140
push eax
lea ecx, [ebp + 0x68]
call fcn.00404570
mov ecx, dword [ebp + 0x50]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp + 0x74]
add ecx, 0xfffffff0
call fcn.00404d30
mov eax, dword [ebp + 0x68]
cmp dword [eax - 0xc], ebx
jne 0x47789c
lea eax, [ebp + 0x48]
push eax
call fcn.0047605c
mov edi, dword [ebp + 0x30]
pop ecx
test al, al
je 0x477a96
push dword [ebp + 0x3c]
push dword [ebp + 0x58]
call fcn.00475cf8
pop ecx
pop ecx
test al, al
je 0x477a96
push dword [ebp + 0x5c]
lea eax, [ebp + 0x2c]
push eax
call fcn.00476b56
pop ecx
pop ecx
cmp dword [edi - 0xc], ebx
jne 0x477a46
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
lea ecx, [ebp - 0x24]
call fcn.0047b281
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
lea ecx, [ebp + 0x40]
call fcn.0047b281
jmp 0x477a34
lea ecx, [ebp + 0x40]
call fcn.0046b2a0
lea ecx, [ebp + 0x2c]
add eax, 4
push ecx
mov ecx, eax
call fcn.0047647c
lea ecx, [ebp + 0x40]
call fcn.00485810
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 0x40]
call fcn.0047065d
test al, al
je 0x477a16
jmp 0x477a8b
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp + 0x34]
push eax
lea ecx, [ebp - 4]
call fcn.004868d6
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
lea ecx, [ebp - 0x2c]
call fcn.0047b281
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp + 0x34]
call fcn.0047065d
test al, al
jne 0x477a8b
lea ecx, [ebp + 0x34]
call fcn.0046b2a0
lea ecx, [ebp + 0x2c]
add eax, 4
push ecx
mov ecx, eax
call fcn.0047647c
mov ecx, dword [ebp + 0x2c]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp + 0x68]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp + 0x5c]
add ecx, 0xfffffff0
call fcn.00404d30
lea ecx, [edi - 0x10]
call fcn.00404d30
mov ecx, dword [ebp + 0x48]
add ecx, 0xfffffff0
call fcn.00404d30
lea ecx, [ebp + 0x1c]
call fcn.004282c0
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp + 0x1c]
call fcn.00409fa0
test al, al
je 0x477852
lea eax, [ebp + 0x50]
push str.config_newui_themesdefault_theme.xml
push eax
call fcn.004066d0
pop ecx
push eax
lea eax, [ebp + 0x68]
push eax
call fcn.004067a0
mov ecx, dword [ebp + 0x50]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.00404d30
push dword [ebp + 0x68]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x477b43
mov ecx, dword [ebp + 0x68]
add ecx, 0xfffffff0
call fcn.00404d30
lea ecx, [ebp - 0x50]
call fcn.00427c50
push dword [ebp - 0x50]
call fcn.00493cb0
pop ecx
lea ecx, [ebp - 4]
call fcn.00476e8c
push dword [ebp - 4]
call fcn.00493cb0
pop ecx
mov al, bl
jmp 0x47771a
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push dword [ebp + 0x68]
mov byte [ebp + 0x73], bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 0x3c], eax
cmp eax, 0xffffffff
je 0x477daa
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
lea ecx, [ebp + 0x74]
mov edi, eax
call fcn.00418850
lea eax, [edi + 1]
push eax
lea ecx, [ebp + 0x74]
call fcn.00418960
mov dword [ebp + 0x50], eax
cmp eax, ebx
je 0x477bb3
push ebx
lea ecx, [ebp + 0x58]
push ecx
push edi
push eax
push dword [ebp + 0x3c]
mov dword [ebp + 0x58], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x477bb3
cmp dword [ebp + 0x58], edi
jne 0x477bb3
mov eax, dword [ebp + 0x50]
mov byte [eax + edi], bl
push 0xffffffffffffffff
lea ecx, [ebp + 0x74]
call fcn.004186c0
push dword [ebp + 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x74]
cmp dword [eax - 0xc], ebx
je 0x477d9f
push ebx
push str._language_font_face_
lea ecx, [ebp + 0x74]
call fcn.00475fb2
push ebx
push str.__language_font_face_
lea ecx, [ebp + 0x74]
mov dword [ebp + 0x6c], eax
call fcn.00475fb2
cmp dword [ebp + 0x6c], 0xffffffff
mov edi, eax
je 0x477d9f
cmp edi, 0xffffffff
je 0x477d9f
push str._language_font_face_
call fcn.00497360
add dword [ebp + 0x6c], eax
sub edi, dword [ebp + 0x6c]
pop ecx
push edi
push dword [ebp + 0x6c]
lea ecx, [ebp + 0x74]
call fcn.004761b2
push esi
lea ecx, [ebp + 0x5c]
call fcn.00418850
push esi
lea ecx, [ebp + 0x48]
call fcn.00418850
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
lea ecx, [ebp + 0x34]
call fcn.0047b281
mov eax, dword [ebp + 0x34]
mov dword [ebp + 0x60], eax
mov eax, dword [ebp + 0x38]
mov dword [ebp + 0x64], eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
lea ecx, [ebp + 0x34]
call fcn.0047b281
mov eax, dword [ebp + 0x34]
mov dword [ebp + 0x54], eax
mov eax, dword [ebp + 0x38]
mov dword [ebp + 0x58], eax
jmp 0x477cc4
lea ecx, [ebp + 0x54]
call fcn.0046b2a0
lea ecx, [ebp + 0x54]
mov esi, eax
call fcn.0046b2a0
push dword [eax]
lea eax, [ebp + 0x50]
push eax
call fcn.00476b56
push dword [esi + 4]
push dword [eax]
lea eax, [ebp + 0x48]
push str.__s_face__s___
push eax
call fcn.00476549
mov ecx, dword [ebp + 0x50]
add esp, 0x18
add ecx, 0xfffffff0
call fcn.00404d30
mov eax, dword [ebp + 0x48]
push dword [eax - 0xc]
lea ecx, [ebp + 0x5c]
push eax
call fcn.0047629b
lea ecx, [ebp + 0x54]
call fcn.00485810
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp + 0x54]
call fcn.0047065d
test al, al
je 0x477c6f
push dword [ebp + 0x5c]
lea ecx, [ebp + 0x74]
push dword [ebp + 0x6c]
call fcn.004763fc
lea eax, [ebp + 0x50]
push eax
call fcn.00476118
mov edi, dword [ebp + 0x50]
pop ecx
cmp dword [edi - 0xc], ebx
je 0x477d81
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x477d81
mov eax, dword [ebp + 0x74]
push ebx
lea ecx, [ebp + 0x58]
mov dword [ebp + 0x58], ebx
mov eax, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp + 0x74]
call fcn.004186a0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x477d4a
mov eax, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x74]
cmp eax, dword [ecx - 0xc]
jne 0x477d4a
mov byte [ebp + 0x73], 1
jmp 0x477d50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 0x73], bl
je 0x477d74
push ebx
push dword [ebp + 0x68]
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x477d74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp + 0x73], bl
push 1
push 1
push edi
call fcn.00414e60
add esp, 0xc
lea ecx, [edi - 0x10]
call fcn.00404d30
mov ecx, dword [ebp + 0x48]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp + 0x5c]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp + 0x74]
add ecx, 0xfffffff0
call fcn.00404d30
mov bl, byte [ebp + 0x73]
jmp 0x477b0f