Function at 0x10004df0
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x1002bea0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
push ebx
mov dword [ebp - 0x110], eax
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.1001557c
lea ecx, [ebp - 0x108]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004e33
sub ecx, edx
cmp byte [ebp + ecx - 0x109], 0x5c
je 0x10004e5f
push 0x10022480
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.10015828
add esp, 0xc
push esi
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.10015828
add esp, 0xc
cmp dword [ebp + 0x10], 0xffffffff
je 0x10004f04
push 0x2e
push esi
call fcn.10012100
mov edi, eax
add esp, 8
test edi, edi
je 0x10004f04
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004e98
sub ecx, edx
mov edx, esi
lea eax, [edx + 1]
mov dword [ebp - 0x10c], eax
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x10004eb0
sub edx, dword [ebp - 0x10c]
lea eax, [ebp - 0x108]
push dword [ebp + 0x10]
sub ecx, edx
sub ecx, esi
push 0x10022498
add ecx, edi
add eax, ecx
push 4
push eax
call fcn.10001fc0
lea ecx, [ebp - 0x108]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004ee7
sub ecx, edx
lea eax, [ebp - 0x108]
push edi
add eax, ecx
push 5
push eax
call fcn.10015828
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push ebx
call edi
cmp eax, 0xffffffff
jne 0x10004fc3
test ebx, ebx
je 0x10004fc3
cmp byte [ebx], 0
je 0x10004fc3
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004f30
sub ecx, edx
push ebx
lea eax, [ecx + ebx]
mov dword [ebp - 0x10c], eax
mov esi, eax
call edi
cmp eax, 0xffffffff
jne 0x10004fc3
nop dword [eax]
test esi, esi
je 0x10004f70
push 0x5c
push ebx
call fcn.10012100
mov esi, eax
add esp, 8
test esi, esi
je 0x10004f68
mov byte [esi], 0
push ebx
call edi
cmp eax, 0xffffffff
je 0x10004f50
cmp esi, dword [ebp - 0x10c]
jae 0x10004fc3
test esi, esi
je 0x10004f81
mov byte [esi], 0x5c
jmp 0x10004f88
cmp byte [ebx], 0
mov esi, ebx
je 0x10004f8e
inc esi
cmp byte [esi], 0
jne 0x10004f88
xor edi, edi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x10004fbb
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10004fbb
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
inc edi
cmp eax, 0xa
jl 0x10004f90
jmp 0x10004fc3
cmp esi, dword [ebp - 0x10c]
jb 0x10004f78
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10004ffc
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001025d
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x110]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.1001025d
mov esp, ebp
pop ebp
ret