Function at 0x41beb0
Capabilities:
Check if file exists
Create directory
Delete directory
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4580c2
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x46e3d0]
xor eax, esp
mov dword [esp + 0x470], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46e3d0]
xor eax, esp
push eax
lea eax, [esp + 0x48c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x49c]
xor ebx, ebx
push 0xffffffffffffffff
mov edi, 7
push ebx
lea ecx, [esp + 0x38]
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], bx
call fcn.00406cc0
mov dword [esp + 0x494], ebx
mov eax, dword [esp + 0x44]
cmp eax, ebx
jg 0x41bf3c
cmp dword [esp + 0x48], 8
jb 0x41bf35
mov eax, dword [esp + 0x34]
push eax
call fcn.0043ef40
add esp, 4
xor eax, eax
jmp 0x41c207
lea esi, [eax - 1]
cmp esi, eax
jbe 0x41bf48
call fcn.0043f7bb
mov eax, dword [esp + 0x34]
mov ebp, 8
cmp dword [esp + 0x48], ebp
jae 0x41bf5b
lea eax, [esp + 0x34]
cmp word [eax + esi*2], 0x5c
je 0x41bf72
push 1
push 0x46042c
lea ecx, [esp + 0x38]
call fcn.00406e50
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x38]
lea ecx, [esp + 0x70]
mov dword [esp + 0x88], edi
mov dword [esp + 0x84], ebx
mov word [esp + 0x74], bx
call fcn.00406cc0
push ebx
lea ecx, [esp + 0x50]
mov byte [esp + 0x498], 1
xor edi, edi
call fcn.00426d70
add esp, 4
push ebx
push eax
or eax, 0xffffffff
lea esi, [esp + 0x38]
mov byte [esp + 0x49c], 2
call fcn.00406d90
mov byte [esp + 0x494], 1
cmp dword [esp + 0x64], ebp
jb 0x41bfdd
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0043ef40
add esp, 4
push 5
push str.test_
lea ecx, [esp + 0x38]
call fcn.00406e50
lea ecx, [ecx]
mov eax, dword [esp + 0x34]
add edi, 1
cmp dword [esp + 0x48], ebp
jae 0x41c001
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41c07c
lea ecx, [esp + 0x30]
call fcn.0041f7a0
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x70]
lea ecx, [esp + 0x38]
call fcn.00406cc0
push edi
lea ecx, [esp + 0x50]
call fcn.00426d70
add esp, 4
push ebx
push eax
or eax, 0xffffffff
lea esi, [esp + 0x38]
mov byte [esp + 0x49c], 3
call fcn.00406d90
mov byte [esp + 0x494], 1
cmp dword [esp + 0x64], ebp
jb 0x41c063
mov edx, dword [esp + 0x50]
push edx
call fcn.0043ef40
add esp, 4
push 5
push str.test_
lea ecx, [esp + 0x38]
call fcn.00406e50
cmp edi, 5
jl 0x41bff0
cmp dword [esp + 0x48], ebp
mov eax, dword [esp + 0x34]
jae 0x41c08a
lea eax, [esp + 0x34]
push ebx
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov edi, eax
neg edi
sbb edi, edi
add edi, 1
push edi
push str._setup_bHaveWrite___d__n
push 0x400
lea eax, [esp + 0x90]
push 0x200
push eax
call fcn.0043ef21
add esp, 0x14
lea ecx, [esp + 0x4c]
call fcn.0042a750
mov byte [esp + 0x494], 4
lea eax, [esp + 0x84]
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], ebx
mov word [esp + 0x18], bx
lea edx, [eax + 2]
jmp 0x41c0f0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41c0f0
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x88]
push ecx
lea esi, [esp + 0x1c]
call fcn.00406f20
mov edx, esi
push ebx
push edx
or eax, 0xffffffff
lea esi, [esp + 0x54]
mov byte [esp + 0x49c], 5
call fcn.00406d90
cmp dword [esp + 0x2c], ebp
jb 0x41c13c
mov eax, dword [esp + 0x18]
push eax
call fcn.0043ef40
add esp, 4
cmp dword [esp + 0x64], ebp
mov edx, dword [esp + 0x50]
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], ebx
mov word [esp + 0x18], bx
jae 0x41c15b
lea edx, [esp + 0x50]
mov ebp, dword [0x471b30]
cmp ebp, ebx
je 0x41c19b
mov eax, edx
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41c170
sub eax, esi
sar eax, 1
push ebp
lea ecx, [eax + eax]
push ecx
push 1
push edx
call fcn.0043fe21
mov edx, dword [0x471b30]
push edx
call fcn.004402ef
add esp, 0x14
mov esi, 8
cmp dword [esp + 0x64], esi
jb 0x41c1b3
mov eax, dword [esp + 0x50]
push eax
call fcn.0043ef40
add esp, 4
cmp dword [esp + 0x48], esi
mov eax, dword [esp + 0x34]
jae 0x41c1c1
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [esp + 0x80], esi
jb 0x41c1de
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.0043ef40
add esp, 4
cmp dword [esp + 0x48], esi
mov dword [esp + 0x80], 7
mov dword [esp + 0x7c], ebx
mov word [esp + 0x6c], bx
jb 0x41c205
mov edx, dword [esp + 0x34]
push edx
call fcn.0043ef40
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x48c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.0043ef12
add esp, 0x484
ret