Function at 0x4051aa
Capabilities:
Create directory
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
push ebx
xor ebx, ebx
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x20], bl
mov byte [ebp - 0x1f], bl
mov byte [ebp - 0x1e], bl
mov byte [ebp - 0x1d], bl
mov byte [ebp - 0x1c], bl
mov byte [ebp - 0x1b], 1
mov byte [ebp - 0x18], bl
mov byte [ebp - 0x17], bl
mov byte [ebp - 0x16], bl
mov byte [ebp - 0x15], bl
mov byte [ebp - 0x14], bl
mov byte [ebp - 0x13], 5
call edi
test eax, eax
je 0x405403
push 0x40
lea eax, [ebp - 0x74]
push ebx
push eax
call fcn.00416e30
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x74], 0x10000000
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], 3
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], 5
call edi
test eax, eax
je 0x405403
mov ecx, dword [ebp - 0x10]
push 2
pop eax
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 8]
push ecx
push ebx
lea ecx, [ebp - 0x74]
push ecx
push eax
mov dword [ebp - 0x54], 0x10000000
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], 3
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
test eax, eax
jne 0x405403
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x405403
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x405403
push ebx
push dword [ebp - 8]
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x405403
mov eax, dword [ebp - 4]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x34], 0xc
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push dword [ebp - 4]
push 4
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp + 0xc], bl
je 0x405403
push 0x103
lea eax, [ebp - 0x177]
push ebx
push eax
mov byte [ebp - 0x178], bl
call fcn.00416e30
push dword [ebp + 8]
lea eax, [ebp - 0x178]
push str._s_ars.cfg
push 0x104
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp + 0xc], ebx
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x1c
push ebx
lea edi, [esi + 0x7f]
push edi
push 3
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0x80000000
lea eax, [ebp - 0x178]
push eax
call esi
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x4053b5
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x28], eax
add eax, 0x10
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push edi
push 2
lea eax, [ebp - 0x34]
push eax
push 1
push 0x40000000
lea eax, [ebp - 0x178]
push eax
call esi
mov esi, eax
cmp dword [ebp + 0xc], ebx
jbe 0x4053e9
push ebx
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
mov dword [ebp + 8], ebx
push dword [ebp - 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0xc], ebx
je 0x405413
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x10], ebx
je 0x40541d
push dword [ebp - 0x10]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], ebx
je 0x40542d
push dword [ebp - 8]
call esi
cmp dword [ebp - 4], ebx
je 0x405437
push dword [ebp - 4]
call esi
pop edi
pop esi
pop ebx
leave
ret 8