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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x448247
mov eax, dword fs:[0]
push eax
sub esp, 0x1b4
mov eax, dword [0x4590c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [ebp - 0x1b0]
call fcn.00414d10
lea eax, [ebp - 0x1ac]
push eax
mov ecx, 0x44e978
mov dword [ebp - 4], 0
call fcn.00401e30
mov byte [ebp - 4], 1
mov ecx, dword [esi + 0x74]
mov edx, dword [esi + 0x70]
push ecx
push edx
push str._I64d
lea edi, [ebp - 0x1ac]
call fcn.0040e9a0
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [eax - 0xc]
add esp, 0xc
push ecx
push eax
mov ebx, edi
call fcn.004019a0
push 0x103
xor edi, edi
lea eax, [ebp - 0x19f]
push edi
push eax
mov byte [ebp - 0x1a0], 0
call fcn.004338d0
add esp, 0xc
push edi
push 0x23
lea ecx, [ebp - 0x1a0]
push ecx
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.SQ_PlatForm
lea edx, [ebp - 0x1a0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x1c0]
push eax
lea ecx, [ebp - 0x1a0]
push ecx
mov dword [ebp - 0x1c0], 0xc
mov dword [ebp - 0x1bc], edi
mov dword [ebp - 0x1b8], edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [ebp - 0x1ac]
mov ebx, eax
cmp eax, edi
je 0x412561
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x412561
add eax, eax
mov dword [ebp - 0x1a8], eax
call fcn.004383d0
mov edi, esp
test edi, edi
je 0x412561
mov edx, dword [ebp - 0x1a8]
push 0
push 0
push edx
push edi
push 0xffffffffffffffff
push ebx
push 0
push 3
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, edi
jmp 0x412563
xor eax, eax
push eax
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [ebp - 0x1a0]
push 0x44ea88
push ecx
call fcn.00431843
mov edi, eax
add esp, 8
test edi, edi
je 0x4127de
push 0x80
lea edx, [ebp - 0x97]
push 0
push edx
mov byte [ebp - 0x98], 0
call fcn.004338d0
add esp, 0xc
lea eax, [ebp - 0x1a4]
push eax
mov ecx, 0x44e978
call fcn.00401e30
lea ecx, [ebp - 0x1a8]
push ecx
mov bl, 2
mov ecx, 0x44e978
mov byte [ebp - 4], bl
call fcn.00401e30
push edi
push 0x80
lea edx, [ebp - 0x98]
push 1
push edx
mov byte [ebp - 4], 3
call fcn.00431d56
add esp, 0x10
test eax, eax
je 0x412635
lea eax, [ebp - 0x1a4]
push eax
lea ecx, [ebp - 0x98]
call fcn.004016f0
push 0x81
lea ecx, [ebp - 0x98]
push 0
push ecx
call fcn.004338d0
add esp, 0xc
push edi
push 0x80
lea edx, [ebp - 0x98]
push 1
push edx
call fcn.00431d56
add esp, 0x10
test eax, eax
jne 0x4125f2
push edi
call fcn.00431a98
mov eax, dword [ebp - 0x1a4]
add esp, 4
mov ecx, 0x44ed14
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x412676
test dx, dx
je 0x412672
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x412676
add eax, 4
add ecx, 4
test dx, dx
jne 0x412650
xor eax, eax
jmp 0x41267b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
or edx, 0xffffffff
mov byte [ebp - 4], bl
test al, al
mov eax, dword [ebp - 0x1a8]
je 0x41272c
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1a4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1ac]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4126f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412722
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x4127bc
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412745
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1a4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41276b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1ac]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412791
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1b0]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4127ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
lea esp, [ebp - 0x1d0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00430efe
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x1a4], 0
call fcn.00431766
cdq
mov ecx, 0x3e8
idiv ecx
lea eax, [edx + 1]
cmp eax, dword [esi + 0x54]
jge 0x412807
mov dword [ebp - 0x1a4], 1
lea edx, [ebp - 0x1a0]
push 0x44ea84
push edx
call fcn.00431843
add esp, 8
mov dword [ebp - 0x1b4], eax
test eax, eax
je 0x4128e2
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x1a8], eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1a4]
push eax
push 0x44ff10
lea edi, [ebp - 0x1a8]
call fcn.0040e9a0
mov ebx, dword [ebp - 0x1a8]
add esp, 8
test ebx, ebx
jne 0x41286d
xor eax, eax
jmp 0x41289a
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x412880
xor eax, eax
jmp 0x41289a
lea edi, [eax + eax]
mov eax, edi
call fcn.004383d0
mov esi, esp
mov edx, 3
mov ecx, edi
mov eax, ebx
call fcn.00410ef0
mov ecx, eax
lea esi, [ecx + 1]
nop
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x4128a0
sub ecx, esi
mov esi, dword [ebp - 0x1b4]
push esi
push ecx
push 1
push eax
call fcn.004319b1
push esi
call fcn.00431a98
lea eax, [ebx - 0x10]
add esp, 0x14
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4128e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x1a4], 1
jne 0x41276b
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1ac]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412915
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1b0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412722
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x4127bc