Function at 0x4797e0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x540fd2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov eax, dword [0x591288]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], eax
xor ebp, ebp
push 0x338
mov dword [esp + 0x40], ebp
call fcn.0050d138
add esp, 4
mov dword [esp + 0x2c], eax
cmp eax, ebp
mov byte [esp + 0x3c], 1
je 0x47983c
mov ecx, dword [edi + 0x38]
push 1
push ecx
mov ecx, eax
call fcn.004640a0
mov esi, eax
mov dword [esp + 0x20], esi
jmp 0x479842
mov dword [esp + 0x20], ebp
mov esi, ebp
push 0xe000
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 0
call fcn.004c9660
push 1
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0050d172
mov ecx, esi
call fcn.00464ad0
push ebp
push esi
push ebp
mov ecx, edi
call fcn.0041bc90
push ebp
mov ecx, esi
call fcn.0041c7e0
push 0x338
call fcn.0050d138
add esp, 4
mov dword [esp + 0x2c], eax
cmp eax, ebp
mov byte [esp + 0x3c], 2
je 0x4798ac
mov ecx, dword [edi + 0x38]
push 1
push ecx
mov ecx, eax
call fcn.004640a0
mov ebx, eax
jmp 0x4798ae
xor ebx, ebx
push 0xef14
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 0
call fcn.004c9660
push 2
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0050d172
mov ecx, ebx
call fcn.00464ad0
push ebp
push ebx
push esi
mov ecx, edi
call fcn.0041bc90
push 1
mov ecx, ebx
call fcn.0041c7e0
push 0x338
call fcn.0050d138
add esp, 4
mov dword [esp + 0x2c], eax
cmp eax, ebp
mov byte [esp + 0x3c], 3
je 0x479919
mov ecx, dword [edi + 0x38]
push 1
push ecx
mov ecx, eax
call fcn.004640a0
mov ebx, eax
jmp 0x47991b
xor ebx, ebx
push 0xef16
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 0
call fcn.004c9660
push 4
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0050d172
mov ecx, ebx
call fcn.00464ad0
push ebp
push ebx
push esi
mov ecx, edi
call fcn.0041bc90
push 3
mov ecx, ebx
call fcn.0041c7e0
mov eax, dword [0x591288]
mov dword [esp + 0x14], eax
push 0xef70
lea ecx, [esp + 0x18]
mov byte [esp + 0x40], 4
call fcn.004c9660
lea ecx, [esp + 0x28]
push 4
push ecx
call fcn.0042eff0
mov ecx, eax
call fcn.0042fdd0
mov edx, dword [0x591288]
mov dword [esp + 0x24], edx
push 0xf422
lea ecx, [esp + 0x28]
mov byte [esp + 0x40], 6
call fcn.004c9660
push 0x58ba98
lea ecx, [esp + 0x18]
call fcn.0050d7d9
lea eax, [esp + 0x24]
lea ecx, [esp + 0x14]
push eax
call fcn.0050d815
mov dword [esp + 0x1c], ebp
mov ebp, 0x58c1bc
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push 0x2c
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call fcn.0051418c
push 0x338
call fcn.0050d138
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
mov byte [esp + 0x3c], 7
je 0x479a0d
mov ecx, dword [edi + 0x38]
push 1
push ecx
mov ecx, eax
call fcn.004640a0
mov esi, eax
jmp 0x479a0f
xor esi, esi
push 0
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
mov byte [esp + 0x48], 6
call fcn.0050d172
mov ecx, esi
call fcn.00464ad0
lea eax, [esp + 0x28]
push 0x588788
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.0050d692
mov edx, dword [ebp]
mov byte [esp + 0x3c], 8
push edx
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0050d692
lea ecx, [esp + 0x2c]
mov byte [esp + 0x3c], 0xa
call fcn.0050d3fd
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0050d172
mov ecx, esi
call fcn.00464ce0
push 0
push esi
push ebx
mov ecx, edi
call fcn.0041bc90
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x479a9b
test al, 0x10
jne 0x479aa8
mov ecx, dword [esp + 0x18]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x18]
mov byte [esp + 0x3c], 6
call fcn.0050d3fd
mov edx, dword [esp + 0x1c]
add ebp, 4
inc edx
cmp ebp, str.Driver
mov dword [esp + 0x1c], edx
jl 0x4799cc
push 0x338
call fcn.0050d138
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
mov byte [esp + 0x3c], 0xb
je 0x479af9
mov edx, dword [edi + 0x38]
push 1
push edx
mov ecx, eax
call fcn.004640a0
mov esi, eax
jmp 0x479afb
xor esi, esi
push 0xef2f
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 6
call fcn.004c9660
push 6
push ecx
lea eax, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
call fcn.0050d172
mov ecx, esi
call fcn.00464ad0
mov ecx, dword [esp + 0x20]
push 0
push esi
push ecx
mov ecx, edi
call fcn.0041bc90
push 4
mov ecx, esi
call fcn.0041c7e0
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 5
call fcn.0050d3fd
lea ecx, [esp + 0x28]
mov byte [esp + 0x3c], 4
call fcn.0050d3fd
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 0
call fcn.0050d3fd
lea ecx, [esp + 0x10]
mov dword [esp + 0x3c], 0xffffffff
call fcn.0050d3fd
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x30
ret