Function at 0x45d050
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd3c
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0xd38], eax
mov eax, dword [ebp + 8]
mov ecx, 0x228
push ebx
mov ebx, dword [0x616724]
push esi
push edi
lea edi, [esp + 0x18]
mov dword [esp + 0xc], eax
lea esi, [ebx + 0x4c28]
mov word [esp + 0x10], 0xfeff
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x18]
mov dword [esp + 0xcec], 0x3e8
push ecx
push 0x455360
push eax
push 0x420
push 0xfffffffffffffffa
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
push eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp eax, 1
jne 0x45d52a
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45d177
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x45d15b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x7d0
mov esi, eax
call fcn.00560858
add esp, 4
mov edi, eax
push esi
push 0x838
push 0x5aabc8
push 0x5aa1dc
push 0x1f4
push edi
call fcn.00406c50
add esp, 0x18
push 0x30
push 0x591508
push edi
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
call fcn.00560853
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd38]
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x228
lea esi, [esp + 0x18]
lea edi, [ebx + 0x4c28]
rep movsd dword es:[edi], dword [esi]
cmp byte [ebx + 0x5364], 0
push ebx
je 0x45d199
push 0x5b2b0c
jmp 0x45d19e
push 0x5b066c
push str.EncodeFix
push str.Encode
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
movsx esi, word [ebx + 0x5366]
lea eax, [esp + 0xd30]
push esi
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
sar esi, 0x1f
xor edx, edx
and esi, 1
mov ecx, eax
inc esi
add esp, 0x10
sub ecx, esi
cmp eax, esi
cmovl ecx, edx
cmp ecx, eax
jge 0x45d203
sub eax, ecx
lea esi, [esp + 0xd30]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [esp + 0xd10]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
jmp 0x45d205
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
xor ecx, ecx
push ebx
mov word [esp + eax*2 + 0xd14], cx
lea eax, [esp + 0xd14]
push eax
push str.FixedEncode
push str.Encode
call edi
cmp byte [ebx + 0x5368], 0
push ebx
je 0x45d23b
push 0x5b2b0c
jmp 0x45d240
push 0x5b066c
push 0x5b12f8
push str.Encode
call edi
cmp byte [ebx + 0x5369], 0
push ebx
je 0x45d25d
push 0x5b2b0c
jmp 0x45d262
push 0x5b066c
push str.EUCJP
push str.Encode
call edi
cmp byte [ebx + 0x536a], 0
push ebx
je 0x45d27f
push 0x5b2b0c
jmp 0x45d284
push 0x5b066c
push 0x5b1310
push str.Encode
call edi
cmp byte [ebx + 0x536b], 0
push ebx
je 0x45d2a1
push 0x5b2b0c
jmp 0x45d2a6
push 0x5b066c
push str.UTF8
push str.Encode
call edi
cmp byte [ebx + 0x536c], 0
push ebx
je 0x45d2c3
push 0x5b2b0c
jmp 0x45d2c8
push 0x5b066c
push str.UTF16LE
push str.Encode
call edi
cmp byte [ebx + 0x536d], 0
push ebx
je 0x45d2e5
push 0x5b2b0c
jmp 0x45d2ea
push 0x5b066c
push 0x5b1334
push str.Encode
call edi
cmp byte [ebx + 0x536e], 0
push ebx
je 0x45d307
push 0x5b2b0c
jmp 0x45d30c
push 0x5b066c
push str.UTF7
push str.Encode
call edi
cmp byte [ebx + 0x536f], 0
push ebx
je 0x45d329
push 0x5b2b0c
jmp 0x45d32e
push 0x5b066c
push str.CP1252
push str.Encode
call edi
cmp byte [ebx + 0x5370], 0
push ebx
je 0x45d34b
push 0x5b2b0c
jmp 0x45d350
push 0x5b066c
push 0x5b1360
push str.Encode
call edi
cmp byte [ebx + 0x5371], 0
push ebx
je 0x45d36d
push 0x5b2b0c
jmp 0x45d372
push 0x5b066c
push str.UTF32LE
push str.Encode
call edi
cmp byte [ebx + 0x5372], 0
push ebx
je 0x45d38f
push 0x5b2b0c
jmp 0x45d394
push 0x5b066c
push 0x5b1378
push str.Encode
call edi
movsd xmm3, qword [ebx + 0x5378]
lea ecx, [esp + 0xd10]
push 3
mov edx, 6
call fcn.00407630
add esp, 4
lea eax, [esp + 0xd10]
push ebx
push eax
push str.UTF7_Rate
push str.Encode
call edi
movsd xmm3, qword [ebx + 0x5380]
lea ecx, [esp + 0xd10]
push 3
mov edx, 6
call fcn.00407630
add esp, 4
lea eax, [esp + 0xd10]
push ebx
push eax
push str.JIS_Rate
push str.Encode
call edi
movsd xmm3, qword [ebx + 0x5388]
lea ecx, [esp + 0xd10]
push 3
mov edx, 6
call fcn.00407630
add esp, 4
lea eax, [esp + 0xd10]
push ebx
push eax
push str.EUCJP_Rate
push str.Encode
call edi
movsd xmm3, qword [ebx + 0x5390]
lea ecx, [esp + 0xd10]
push 3
mov edx, 6
call fcn.00407630
add esp, 4
lea eax, [esp + 0xd10]
push ebx
push eax
push str.UHC_Rate
push str.Encode
call edi
movsd xmm3, qword [ebx + 0x5398]
lea ecx, [esp + 0xd10]
push 3
mov edx, 6
call fcn.00407630
add esp, 4
lea eax, [esp + 0xd10]
push ebx
push eax
push str.CP1252_Rate
push str.Encode
call edi
movsx esi, word [ebx + 0x53a0]
lea eax, [esp + 0xd30]
push esi
push 0x5a9ffc
push 0xa
push eax
call fcn.00406c50
sar esi, 0x1f
xor edx, edx
and esi, 1
mov ecx, eax
add esi, 6
add esp, 0x10
sub ecx, esi
cmp eax, esi
cmovl ecx, edx
cmp ecx, eax
jge 0x45d4fc
sub eax, ecx
lea esi, [esp + 0xd30]
lea esi, [esi + ecx*2]
mov ecx, eax
shr ecx, 1
lea edi, [esp + 0xd10]
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x45d4fe
xor eax, eax
xor ecx, ecx
push ebx
mov word [esp + eax*2 + 0xd14], cx
lea eax, [esp + 0xd14]
push eax
push str.CheckSize
push str.Encode
call edi
push ebx
push 0
push 0
push 0
call edi
mov al, 1
jmp 0x45d52c
xor al, al
mov ecx, dword [esp + 0xd44]
pop edi
pop esi
pop ebx
xor ecx, esp
mov dword [0x5f64b8], 0
call fcn.0056060a
mov esp, ebp
pop ebp
ret 4