Function at 0x431c20
Capabilities:
Check if file exists
Create directory
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44a2e8
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
mov esi, dword [ebp + 4]
test esi, esi
jne 0x431c4c
mov esi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov eax, dword [0x4557e0]
test esi, esi
mov dword [esp + 0x2c], eax
je 0x431caa
mov ecx, esi
shr ecx, 0x10
jne 0x431c72
and esi, 0xffff
lea ecx, [esp + 0x2c]
push esi
call fcn.00407050
jmp 0x431caa
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x431caa
push edi
lea ecx, [esp + 0x30]
call fcn.004072c0
test eax, eax
je 0x431caa
lea ecx, [edi + edi]
lea edx, [edi + edi + 2]
cmp edx, ecx
jb 0x431caa
mov edi, dword [esp + 0x2c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2c]
push 0x5c
push ecx
mov dword [esp + 0x2c], 0
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
test eax, eax
jne 0x431ccb
or eax, 0xffffffff
jmp 0x431cd1
sub eax, dword [esp + 0x2c]
sar eax, 1
lea edx, [esp + 0x10]
push eax
push edx
lea ecx, [esp + 0x34]
call fcn.0042f440
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x431cfc
mov ecx, dword [esp + 0x10]
push eax
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov eax, dword [ebp + 4]
test eax, eax
jne 0x431d08
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x431d81
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4557e4]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x431d59
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431d59
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.0043c8a0
add esp, 4
mov eax, dword [esp + 0x2c]
mov edx, dword [0x4557e4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x431eaa
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431eaa
jmp 0x431e9a
mov eax, dword [esp + 0x30]
mov dword [esp + 0x18], 0
cmp eax, 3
jne 0x431d9a
mov dword [esp + 0x18], 1
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0xc]
push 0
push eax
lea ecx, [esp + 0x20]
push 4
push ecx
push esi
mov dword [esp + 0x20], 0
call edi
mov edx, dword [0x458030]
lea eax, [esp + 0xc]
push 0
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
mov dword [esp + 0x28], edx
call edi
mov eax, dword [0x45802c]
test eax, eax
jne 0x431de2
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0xc]
push 0
push edx
lea edx, [ecx + ecx]
push edx
push eax
push esi
call edi
lea eax, [esp + 0xc]
push 0
push eax
push 1
push 0x4582d1
push esi
call edi
mov ecx, dword [0x457f10]
lea edx, [esp + 0xc]
push 0
push edx
lea eax, [esp + 0x1c]
push 4
push eax
push esi
mov dword [esp + 0x28], ecx
call edi
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x431e47
mov ecx, dword [0x457f0c]
test ecx, ecx
jne 0x431e39
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0xc]
push 0
add eax, eax
push edx
push eax
push ecx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov edx, dword [0x4557e4]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x431e7f
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431e7f
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0043c8a0
add esp, 4
mov eax, dword [esp + 0x2c]
mov edx, dword [0x4557e4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x431eaa
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x431eaa
mov edx, dword [esp + 0x2c]
add edx, 0xfffffff4
push edx
call fcn.0043c8a0
add esp, 4
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1c
ret