Function at 0x4f76f0
Capabilities:
Check if file exists
Copy file
Create directory
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x658
mov eax, dword [0x6dc0b8]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x350], edx
xor ebx, ebx
push edi
mov dword [ebp - 0x34c], ebx
cmp dword [esi + 0x10], 0x104
jae 0x4f7ade
cmp dword [edx + 0x10], 0x104
jae 0x4f7ade
push edx
lea ecx, [ebp - 0x38]
call fcn.004dff00
cmp dword [ebp - 0x24], 8
lea eax, [ebp - 0x38]
cmovae eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4f77f9
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x20]
call fcn.004f7490
lea ecx, [ebp - 0x38]
cmp ecx, eax
je 0x4f776f
push 0xffffffffffffffff
push ebx
push eax
call fcn.00416500
lea ecx, [ebp - 0x20]
call fcn.004163e0
cmp dword [ebp - 0x28], ebx
je 0x4f783f
mov edx, esi
lea ecx, [ebp - 0x80]
call fcn.004f7490
mov edx, dword [ebp - 0x70]
test edx, edx
je 0x4f7ab9
mov edi, dword [ebp - 0x28]
cmp edi, edx
jb 0x4f77cb
cmp dword [ebp - 0x6c], 8
lea ecx, [ebp - 0x80]
push edx
cmovae ecx, dword [ebp - 0x80]
lea eax, [ebp - 0x38]
cmp edx, edi
push ecx
cmovbe edi, edx
cmp dword [ebp - 0x24], 8
push edi
cmovae eax, dword [ebp - 0x38]
push eax
call fcn.00411dd0
add esp, 0x10
test eax, eax
je 0x4f7ab9
push 3
push ecx
push esi
lea ecx, [ebp - 0x344]
call fcn.004fd720
push esi
call fcn.004f7b00
add esp, 4
test al, al
jne 0x4f785c
lea ecx, [ebp - 0x344]
xor bl, bl
call fcn.004fd890
jmp 0x4f7abb
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x38]
call fcn.004e9790
mov edx, eax
lea ecx, [ebp - 0x20]
call fcn.004f7490
lea ecx, [ebp - 0x38]
cmp ecx, eax
je 0x4f7823
push 0xffffffffffffffff
push 0
push eax
call fcn.00416500
lea ecx, [ebp - 0x20]
call fcn.004163e0
lea ecx, [ebp - 0x98]
call fcn.004163e0
cmp dword [ebp - 0x28], ebx
jne 0x4f7780
lea ecx, [ebp - 0x38]
xor bl, bl
call fcn.004163e0
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00545b50
mov esp, ebp
pop ebp
ret
push esi
lea ecx, [ebp - 0x50]
call fcn.004dff00
mov ecx, esi
call fcn.004f7b20
push esi
lea ecx, [ebp - 0x68]
mov byte [ebp - 0x34c], al
mov byte [ebp - 0x345], 1
call fcn.004dff00
mov edi, dword [ebp - 0x350]
mov ecx, edi
call fcn.004f7b20
test al, al
je 0x4f78c0
lea eax, [ebp - 0x98]
mov ecx, esi
push eax
call fcn.004e9790
lea ecx, [ebp - 0x68]
cmp ecx, eax
je 0x4f78b2
push 0xffffffffffffffff
push 0
push eax
call fcn.00416500
lea ecx, [ebp - 0x98]
call fcn.004163e0
nop dword [eax]
cmp dword [ebp - 0x40], 0
je 0x4f7a8a
push edi
lea ecx, [ebp - 0x20]
call fcn.004dff00
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x68]
call fcn.004e9270
test al, al
je 0x4f78fb
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x68]
call fcn.004e9540
test al, al
je 0x4f7aad
cmp byte [ebp - 0x34c], 0
je 0x4f7950
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
cmovae eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4f7926
shr eax, 4
and al, 1
jne 0x4f79dd
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
push 0
cmovae eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4f79dd
test bl, 4
je 0x4f79d6
and ebx, 0xfffffffb
jmp 0x4f79cb
lea ecx, [ebp - 0x50]
call fcn.004e9f80
test al, al
jne 0x4f79bd
lea ecx, [ebp - 0x20]
call fcn.004e9f80
test al, al
jne 0x4f79bd
cmp dword [ebp - 0x40], 0x104
jae 0x4f79bd
cmp dword [ebp - 0x10], 0x104
jae 0x4f79bd
cmp dword [ebp - 0xc], 8
lea esi, [ebp - 0x20]
push 0
cmovae esi, dword [ebp - 0x20]
lea eax, [ebp - 0x50]
cmp dword [ebp - 0x3c], 8
push esi
cmovae eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4f79bd
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4f79bd
test al, 1
je 0x4f79b9
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov al, 1
jmp 0x4f79bf
xor al, al
test al, al
jne 0x4f79dd
test bl, 8
je 0x4f79d6
and ebx, 0xfffffff7
lea ecx, [ebp - 0x404]
call fcn.004ef6d0
mov byte [ebp - 0x345], 0
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x344]
call fcn.004fd8e0
lea ecx, [ebp - 0x50]
cmp ecx, eax
je 0x4f7a00
push 0xffffffffffffffff
push 0
push eax
call fcn.00416500
lea ecx, [ebp - 0x98]
call fcn.004163e0
cmp dword [ebp - 0x40], 0
je 0x4f7a75
cmp byte [ebp - 0x344], 0
jne 0x4f7a4b
test bl, 0x10
je 0x4f7a2d
lea ecx, [ebp - 0x404]
and ebx, 0xffffffef
call fcn.004ef6d0
push 0x250
lea eax, [ebp - 0x654]
push 0
push eax
call fcn.005e0dd0
mov eax, dword [ebp - 0x654]
add esp, 0xc
jmp 0x4f7a6a
mov eax, dword [ebp - 0x340]
lea esi, [ebp - 0x340]
mov ecx, 0x94
lea edi, [ebp - 0x654]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x350]
shr eax, 4
and al, 1
mov dword [ebp - 0x34c], eax
lea ecx, [ebp - 0x20]
call fcn.004163e0
cmp byte [ebp - 0x345], 0
jne 0x4f78c0
mov bl, byte [ebp - 0x345]
lea ecx, [ebp - 0x68]
call fcn.004163e0
lea ecx, [ebp - 0x50]
call fcn.004163e0
lea ecx, [ebp - 0x344]
call fcn.004fd890
jmp 0x4f7abb
lea ecx, [ebp - 0x20]
xor bl, bl
call fcn.004163e0
jmp 0x4f7a90
xor bl, bl
lea ecx, [ebp - 0x80]
call fcn.004163e0
lea ecx, [ebp - 0x38]
call fcn.004163e0
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00545b50
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00545b50
mov esp, ebp
pop ebp
ret