Function at 0x40113a
Capabilities:
Create directory
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
push ebx
push esi
push edi
lea eax, [ebp - 0x194]
push 0x104
push eax
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
call dword [0x406024]
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x194]
push 0x80000000
push eax
call dword [0x406020]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401196
mov dword [ebp - 4], 0x4071c0
jmp 0x4014cd
mov esi, dword [0x40601c]
push 2
push ebx
push 0xfffffffffffffff8
push edi
call esi
cmp eax, 0x3e8
mov dword [ebp - 0xc], eax
jb 0x4014af
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x24]
push 8
push eax
push edi
mov dword [ebp - 0x1c], ebx
call dword [0x406018]
test eax, eax
je 0x4014b8
cmp dword [ebp - 0x1c], 8
jne 0x4014b8
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x20], 0x829ab7a5
mov dword [ebp + 8], eax
jne 0x4014af
cmp eax, 4
jl 0x4014af
cmp eax, dword [ebp - 0xc]
jge 0x4014af
push eax
call fcn.00403436
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
je 0x401317
push 2
push ebx
push 0xfffffffffffffff8
mov dword [ebp - 0x18], ebx
pop eax
sub eax, dword [ebp + 8]
push eax
push edi
call esi
cmp eax, 0xffffffff
je 0x4014a6
mov esi, dword [ebp - 8]
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp + 8]
push esi
push edi
call dword [0x406018]
test eax, eax
je 0x4014a6
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x18], eax
jne 0x4014a6
cmp dword [esi], 0x829ab7a5
jne 0x4014a6
lea eax, [ebp - 0x194]
add esi, 4
push eax
push 0x104
call dword [0x406014]
test eax, eax
jne 0x401281
mov dword [ebp - 4], 0x407198
jmp 0x4014bf
mov eax, dword [esi]
add esi, 4
push eax
lea eax, [ebp - 0x90]
push 0x407190
push eax
call dword [0x4060b0]
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x194]
push eax
call fcn.004032d0
add esp, 0x14
lea eax, [ebp - 0x194]
push ebx
push eax
call dword [0x406010]
lea eax, [ebp - 0x194]
push 0x40718c
push eax
call fcn.004032d0
push dword [esi]
sub dword [ebp + 8], 0xc
lea edi, [esi + 4]
push dword [ebp + 8]
push edi
call fcn.00401119
sub dword [ebp + 8], 8
mov eax, dword [edi + 4]
add esp, 0x14
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x14], eax
jle 0x40149d
cmp dword [edi], 0x33e0f0d
jne 0x40149d
cmp eax, ebx
jle 0x40149d
push eax
call fcn.00403436
mov esi, eax
pop ecx
cmp esi, ebx
jne 0x401323
mov dword [ebp - 4], 0x407174
jmp 0x4014bf
push dword [ebp + 8]
add edi, 8
lea eax, [ebp - 0x14]
push edi
push eax
push esi
call fcn.0040321b
add esp, 0x10
test eax, eax
je 0x40134e
push esi
call fcn.0040342b
pop ecx
mov dword [ebp - 4], 0x407158
jmp 0x4014bf
push dword [ebp - 8]
call fcn.0040342b
mov eax, dword [ebp - 0x14]
pop ecx
add eax, esi
mov dword [ebp - 8], esi
cmp esi, eax
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x5c], bl
jae 0x401421
mov edi, esi
push esi
mov dword [ebp + 8], edi
call fcn.004033b0
mov dword [esp], 0x40714c
push edi
lea esi, [esi + eax + 1]
call fcn.00405bd0
pop ecx
test eax, eax
pop ecx
je 0x4013a0
push str.R6028_r_n__unable_to_initialize_heap_r_n
push edi
call fcn.00405bd0
pop ecx
test eax, eax
pop ecx
jne 0x4013ac
lea eax, [ebp - 0x5c]
push edi
push eax
call fcn.004032c0
pop ecx
pop ecx
mov edi, dword [esi]
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x298]
push eax
add esi, 4
call fcn.004032c0
push dword [ebp + 8]
lea eax, [ebp - 0x298]
push eax
call fcn.004032d0
add esp, 0x10
lea eax, [ebp - 0x298]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [0x406020]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x401411
lea ecx, [ebp - 0x28]
push ebx
push ecx
push edi
push esi
push eax
call dword [0x40600c]
push dword [ebp + 8]
call dword [0x406008]
add esi, edi
cmp esi, dword [ebp - 0xc]
jb 0x40136d
cmp byte [ebp - 0x5c], bl
jne 0x40142d
mov dword [ebp - 4], str.SING_error_r_n
jmp 0x4014bf
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x298]
push eax
call fcn.004032c0
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x298]
push eax
call fcn.004032d0
add esp, 0x10
lea eax, [ebp - 0x298]
push eax
call dword [0x406004]
cmp eax, ebx
jne 0x40146d
mov dword [ebp - 4], 0x407100
jmp 0x4014bf
push 0x4070f4
push eax
call dword [section..rdata]
cmp eax, ebx
jne 0x401486
mov dword [ebp - 4], 0x4070d4
jmp 0x4014bf
push 0x3e8
call eax
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x4014bf
mov dword [ebp - 4], 0x4070a8
jmp 0x4014bf
mov dword [ebp - 4], 0x40708c
jmp 0x4014bf
mov dword [ebp - 4], 0x40705c
jmp 0x4014bf
mov dword [ebp - 4], 0x40708c
jmp 0x4014cd
mov dword [ebp - 4], 0x407038
cmp dword [ebp - 8], ebx
je 0x4014cd
push dword [ebp - 8]
call fcn.0040342b
pop ecx
cmp dword [ebp - 4], ebx
jne 0x4014e5
mov eax, dword [ebp - 0x10]
call 0x4014da
add dword [esp], 0x7b26
call eax
jmp 0x4014f6
push 0x10
push 0x407030
push dword [ebp - 4]
push ebx
call dword [0x4060ac]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10