Function at 0x412840
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43a635
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x200
push esi
push edi
lea eax, [ebp - 0x210]
mov dword [ebp - 0x14], 0
push eax
push 0x104
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x2c], xmm0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4128b0
sub ecx, edx
lea eax, [ebp - 0x210]
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.00406290
push 0xb
push str.config.ini
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0041ab20
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x4128e9
mov esi, dword [esi]
lea ecx, [ebp - 0x78]
mov dword [ebp - 0xe0], 0x449050
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0x14], 3
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0xe0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xe0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xe4], eax
lea eax, [ebp - 0xdc]
mov ecx, eax
mov dword [ebp - 0xe4], eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xdc]
mov dword [ebp - 0xdc], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x94], 0
mov byte [ebp - 0x9f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x459e44]
mov ecx, dword [0x459e48]
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0xa4], 0
push ecx
push 2
push esi
lea ecx, [ebp - 0xdc]
mov byte [ebp - 4], 4
call fcn.00414470
test eax, eax
jne 0x4129e3
mov eax, dword [ebp - 0xe0]
lea ecx, [ebp - 0xe0]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [ebp - 0xe0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xe0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xe4], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x10
jb 0x412a44
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x412a3a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x412a3a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00438d0e
add esp, 8
lea eax, [ebp - 0xe0]
mov dword [ebp - 0x1c], 0
push edi
push eax
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
call fcn.004156c0
add esp, 8
cmp dword [ebp - 0x90], 0
je 0x412bdc
mov eax, dword [ebp - 0xd0]
lea ecx, [ebp - 0xa0]
cmp dword [eax], ecx
jne 0x412aa3
mov edx, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebp - 0xc0]
mov dword [eax], ecx
mov eax, dword [ebp - 0xb0]
mov dword [eax], edx
cmp dword [ebp - 0xa4], 0
je 0x412b26
cmp byte [ebp - 0x9f], 0
je 0x412b26
mov eax, dword [ebp - 0xdc]
lea ecx, [ebp - 0xdc]
push 0xffffffffffffffff
mov eax, dword [eax + 0xc]
cmp eax, fcn.0040c660
jne 0x412ad4
call fcn.0040c660
jmp 0x412ad6
call eax
cmp eax, 0xffffffff
jne 0x412adf
xor al, al
jmp 0x412b28
mov ecx, dword [ebp - 0xa4]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x412b9b
sub eax, 1
je 0x412ba2
sub eax, 2
je 0x412b1f
xor al, al
jmp 0x412b28
mov byte [ebp - 0x9f], 0
mov al, 1
push dword [ebp - 0x90]
xor ecx, ecx
lea esi, [ebp - 0xdc]
test al, al
cmove esi, ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor ecx, ecx
add esp, 4
test eax, eax
mov byte [ebp - 0x94], cl
mov byte [ebp - 0x9f], cl
cmovne esi, ecx
lea ecx, [ebp - 0xdc]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x459e44]
mov ecx, dword [0x459e48]
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0xa4], 0
test esi, esi
jne 0x412c3a
jmp 0x412c21
mov byte [ebp - 0x9f], 0
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x104]
sub esi, eax
je 0x412bcd
push dword [ebp - 0x90]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
je 0x412bcd
xor al, al
jmp 0x412b28
cmp byte [ebp - 0x9f], 0
sete al
jmp 0x412b28
lea ecx, [ebp - 0xdc]
mov byte [ebp - 0x94], 0
mov byte [ebp - 0x9f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x459e44]
mov ecx, dword [0x459e48]
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0xa4], 0
mov eax, dword [ebp - 0xe0]
lea ecx, [ebp - 0xe0]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0xe0]
call fcn.00410580
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret