Function at 0x140022320
Capabilities:
Create directory
Read .ini file
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x338]
sub rsp, 0x410
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402aa8c0]
xor rax, rsp
mov qword [rbp + 0x300], rax
mov r15, rcx
mov edx, 1
call fcn.1400301cc
lea r8, [0x1402bf7e0]
lea rdx, str._sSetting
lea rcx, [rbp + 0xf0]
call fcn.14000a640
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0xf0]
call fcn.1401d1654
test eax, eax
je 0x1400223a6
lea rcx, [rbp + 0xf0]
call fcn.1401d404c
mov r9d, dword [0x1402c0c3c]
lea r8, [0x1402bf7e0]
lea rdx, str._sSetting_d
lea rcx, [rbp + 0xf0]
call fcn.14000a640
lea rdx, [rbp - 0x18]
lea rcx, [rbp + 0xf0]
call fcn.1401d1654
test eax, eax
je 0x1400223e7
lea rcx, [rbp + 0xf0]
call fcn.1401d404c
mov r9d, dword [0x1402c0c3c]
lea r8, [0x1402bf7e0]
lea rdx, str._sSetting_dSchedule.dat
lea rcx, [rbp + 0xf0]
call fcn.14000a640
lea rdx, [0x140261b0c]
lea rcx, [rbp + 0xf0]
call fcn.1401d1788
mov rdi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140022cd2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x260]
call qword [sym.imp.USER32.dll_SendMessageW]
mov dword [rsp + 0x30], eax
mov r9, rdi
mov edx, 4
lea r8d, [rdx - 3]
lea rcx, [rsp + 0x30]
call fcn.1401d3fc8
xor r13d, r13d
mov r14d, r13d
mov dword [rsp + 0x34], r13d
lea rsi, [r13 - 1]
movsxd rax, dword [rsp + 0x30]
test eax, eax
jle 0x1400225d5
mov rcx, rax
mov eax, 0x66
mul rcx
cmovo rax, rsi
mov rcx, rax
call fcn.14002970c
mov r12, rax
test rax, rax
je 0x1400225d5
movsxd rcx, dword [rsp + 0x30]
imul r8, rcx, 0x66
xor edx, edx
mov rcx, rax
call fcn.1401cafc0
mov ebx, r13d
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x260]
call qword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jle 0x1400225b8
mov rsi, r12
nop word [rax + rax]
mov edx, ebx
lea rcx, [r15 + 0x220]
call fcn.140045da4
mov byte [rsi], al
mov r9d, 2
mov r8d, ebx
lea rdx, [rsp + 0x58]
lea rcx, [r15 + 0x220]
call fcn.1400366f0
mov rdi, rax
mov rdx, qword [rax]
cmp dword [rdx - 8], 1
jle 0x140022524
mov edx, dword [rdx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rdx, qword [rdi]
movsxd rax, ebx
imul r8, rax, 0x66
sub r8, rdx
add r8, r12
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rdx]
mov word [r8 + rdx + 2], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x140022540
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022573
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea eax, [r14 + 1]
cmp byte [rsi], 0
cmove eax, r14d
mov r14d, eax
inc ebx
add rsi, 0x66
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x260]
call qword [sym.imp.USER32.dll_SendMessageW]
cmp ebx, eax
jl 0x1400224e0
mov dword [rsp + 0x34], r14d
xor r13d, r13d
mov rdi, qword [rsp + 0x50]
lea rsi, [r13 - 1]
movsxd r8, dword [rsp + 0x30]
mov r9, rdi
mov edx, 0x66
mov rcx, r12
call fcn.1401d3fc8
mov rcx, r12
call fcn.140029704
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x348]
call qword [sym.imp.USER32.dll_SendMessageW]
mov dword [rsp + 0x30], eax
mov r9, rdi
mov edx, 4
lea r8d, [rdx - 3]
lea rcx, [rsp + 0x30]
call fcn.1401d3fc8
movsxd rax, dword [rsp + 0x30]
test eax, eax
jle 0x140022765
mov rcx, rax
mov eax, 0x66
mul rcx
cmovo rax, rsi
mov rcx, rax
call fcn.14002970c
mov r12, rax
test rax, rax
je 0x140022765
movsxd rcx, dword [rsp + 0x30]
imul r8, rcx, 0x66
xor edx, edx
mov rcx, rax
call fcn.1401cafc0
mov ebx, r13d
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x348]
call qword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jle 0x140022748
mov rsi, r12
mov r14, 0xffffffffffffffff
nop word [rax + rax]
mov edx, ebx
lea rcx, [r15 + 0x308]
call fcn.140045da4
mov byte [rsi], al
mov r9d, 2
mov r8d, ebx
lea rdx, [rsp + 0x60]
lea rcx, [r15 + 0x308]
call fcn.1400366f0
mov rdi, rax
mov rdx, qword [rax]
cmp dword [rdx - 8], 1
jle 0x1400226c4
mov edx, dword [rdx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rdx, qword [rdi]
movsxd rax, ebx
imul r8, rax, 0x66
sub r8, rdx
add r8, r12
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rdx]
mov word [r8 + rdx + 2], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x1400226e0
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022711
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
inc ebx
add rsi, 0x66
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x348]
call qword [sym.imp.USER32.dll_SendMessageW]
cmp ebx, eax
jl 0x140022680
mov r14d, dword [rsp + 0x34]
xor r13d, r13d
mov rdi, qword [rsp + 0x50]
lea rsi, [r13 - 1]
movsxd r8, dword [rsp + 0x30]
mov r9, rdi
mov edx, 0x66
mov rcx, r12
call fcn.1401d3fc8
mov rcx, r12
call fcn.140029704
xorps xmm0, xmm0
movsd qword [rsp + 0x40], xmm0
mov dword [rsp + 0x48], r13d
lea rcx, [r15 + 0x138]
lea rdx, [rsp + 0x40]
call fcn.140045f8c
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
cmp dword [rsp + 0x48], 0
jne 0x1400227ab
lea rdx, [rbp - 0x60]
movsd xmm0, qword [rsp + 0x40]
call qword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
cmp eax, 1
movzx ebx, word [rbp - 0x58]
je 0x1400227ad
mov ebx, esi
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
cmp dword [rsp + 0x48], 0
jne 0x1400227d4
lea rdx, [rbp - 0x50]
movsd xmm0, qword [rsp + 0x40]
call qword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
cmp eax, 1
movzx ecx, word [rbp - 0x46]
je 0x1400227d6
mov ecx, esi
imul eax, ebx, 0x64
add eax, ecx
mov dword [rsp + 0x38], eax
mov r9, rdi
mov edx, 4
lea r8d, [rdx - 3]
lea rcx, [rsp + 0x38]
call fcn.1401d3fc8
mov rcx, rdi
call fcn.1401d192c
mov r9d, dword [0x1402c0c3c]
lea r8, [0x1402bf7e0]
lea rdx, str._sSetting_dSchedule.ini
lea rcx, [rbp + 0xf0]
call fcn.14000a640
mov r8d, dword [r15 + 0x5c0]
lea rdx, [0x140264a88]
lea rcx, [rbp + 0x80]
call fcn.14000a640
lea r9, [rbp + 0xf0]
lea r8, [rbp + 0x80]
lea rdx, str.Actor
lea rcx, str.Create
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov r8d, dword [r15 + 0x5c4]
lea rdx, [0x140264a88]
lea rcx, [rbp + 0x80]
call fcn.14000a640
lea r9, [rbp + 0xf0]
lea r8, [rbp + 0x80]
lea rdx, str.Class
lea rcx, str.Create
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov r8d, dword [r15 + 0x5c8]
lea rdx, [0x140264a88]
lea rcx, [rbp + 0x80]
call fcn.14000a640
lea r9, [rbp + 0xf0]
lea r8, [rbp + 0x80]
lea rdx, str.Snake
lea rcx, str.Dungeon
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea rcx, [0x1402c0b80]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rsp + 0x38]
mov dword [0x1402ae574], eax
mov dword [0x1402c0758], r14d
mov rcx, qword [0x1402c0548]
test rcx, rcx
je 0x140022908
call fcn.140029704
mov r14d, dword [0x1402c0758]
mov qword [0x1402c0548], r13
test r14d, r14d
jle 0x140022cbb
movsxd rcx, r14d
mov eax, 0x78
mul rcx
cmovo rax, rsi
mov rcx, rax
call fcn.14002970c
mov qword [0x1402c0548], rax
movsxd rcx, dword [0x1402c0758]
imul r8, rcx, 0x78
xor edx, edx
mov rcx, rax
call fcn.1401cafc0
mov r9d, dword [0x1402c0c3c]
lea r8, [0x1402bf7e0]
lea rdx, str._sStatus_d.dat
lea rcx, [rbp + 0xf0]
call fcn.14000a640
mov ebx, r13d
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x260]
call qword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jle 0x140022cbb
mov rsi, r13
cmp r13d, dword [0x1402c0758]
jge 0x140022cbb
mov edx, ebx
lea rcx, [r15 + 0x220]
call fcn.140045da4
test eax, eax
je 0x140022c99
mov r9d, 2
mov r8d, ebx
lea rdx, [rsp + 0x68]
lea rcx, [r15 + 0x220]
call fcn.1400366f0
mov rdi, rax
mov rdx, qword [rax]
cmp dword [rdx - 8], 1
jle 0x1400229e9
mov edx, dword [rdx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rdx, qword [rdi]
movsxd rax, r13d
imul r12, rax, 0x78
mov r8, r12
sub r8, rdx
add r8, qword [0x1402c0548]
nop dword [rax]
movzx eax, word [rdx]
mov word [r8 + rdx], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x140022a00
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
mov rax, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022a34
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r9d, 6
mov r8d, ebx
lea rdx, [rsp + 0x70]
lea rcx, [r15 + 0x220]
call fcn.1400366f0
mov rdi, rax
mov rcx, qword [rax]
cmp dword [rcx - 8], 1
jle 0x140022a68
mov edx, dword [rcx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rcx, qword [rdi]
call fcn.1401d3604
test eax, eax
setne dil
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
mov rax, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022a96
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test dil, dil
je 0x140022c23
mov r9d, 7
mov r8d, ebx
lea rdx, [rsp + 0x78]
lea rcx, [r15 + 0x220]
call fcn.1400366f0
mov rdi, rax
mov rcx, qword [rax]
cmp dword [rcx - 8], 1
jle 0x140022ad3
mov edx, dword [rcx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rcx, qword [rdi]
call fcn.1401d3604
inc al
mov rcx, qword [0x1402c0548]
mov byte [rsi + rcx + 0x64], al
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
mov rax, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022b08
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [r15 + 0x220]
mov rax, qword [0x1402c0548]
mov r8d, ebx
cmp byte [rsi + rax + 0x64], 1
jne 0x140022bc8
mov r9d, 8
lea rdx, [rbp - 0x80]
call fcn.1400366f0
mov rdi, rax
mov rcx, qword [rax]
cmp dword [rcx - 8], 1
jle 0x140022b4d
mov edx, dword [rcx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rcx, qword [rdi]
call fcn.1401d3604
mov rcx, qword [0x1402c0548]
mov dword [rsi + rcx + 0x68], eax
mov rdx, qword [rbp - 0x80]
add rdx, 0xffffffffffffffe8
mov rax, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022b7f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r9d, 9
mov r8d, ebx
lea rdx, [rbp - 0x78]
lea rcx, [r15 + 0x220]
call fcn.1400366f0
mov rdi, rax
mov rcx, qword [rax]
cmp dword [rcx - 8], 1
jle 0x140022bb2
mov edx, dword [rcx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rcx, qword [rdi]
call fcn.1401d3604
mov rcx, qword [0x1402c0548]
mov dword [rsi + rcx + 0x6c], eax
mov rdx, qword [rbp - 0x78]
jmp 0x140022c05
mov r9d, 0xa
lea rdx, [rbp - 0x70]
call fcn.1400366f0
mov rdi, rax
mov rcx, qword [rax]
cmp dword [rcx - 8], 1
jle 0x140022bf1
mov edx, dword [rcx - 0x10]
mov rcx, rax
call fcn.14000b5a0
mov rcx, qword [rdi]
call fcn.1401d3604
mov rcx, qword [0x1402c0548]
mov dword [rsi + rcx + 0x70], eax
mov rdx, qword [rbp - 0x70]
add rdx, 0xffffffffffffffe8
mov rax, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140022c23
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
movups xmmword [rbp + 0x50], xmm0
movups xmmword [rbp + 0x60], xmm0
mov dword [rbp + 0x70], eax
mov rdx, qword [0x1402c0548]
add rdx, r12
lea rax, [rbp + 0xf0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], gethostname
lea r9, [rbp + 0x10]
lea r8, [0x1402671ac]
lea rcx, [0x1402671b0]
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x10]
call fcn.1401d40d0
mov rcx, qword [0x1402c0548]
mov dword [rsi + rcx + 0x74], eax
inc r13d
add rsi, 0x78
inc ebx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1004
mov rcx, qword [r15 + 0x260]
call qword [sym.imp.USER32.dll_SendMessageW]
cmp ebx, eax
jl 0x140022992
mov dword [0x1402c075c], 1
lea rcx, [0x1402c0b80]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x300]
xor rcx, rsp
call fcn.1401c8d10
lea r11, [rsp + 0x410]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret