Function at 0x4271b0
Capabilities:
Write file on windows

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
xor edx, edx
push esi
push ebx
sub esp, 0x36c
mov edi, dword [0x472f40]
mov dword [ebp - 0x34c], eax
xor eax, eax
mov dword [ebp - 0x33c], eax
xor eax, eax
cmp eax, edi
mov dword [ebp - 0x330], ecx
mov dword [ebp - 0x338], edx
jge 0x42724a
mov edx, dword [ebp - 0x34c]
mov ebx, dword [edx + 8]
mov dword [ebp - 0x344], ebx
mov esi, dword [0x472f30]
mov dword [ebp - 0x340], esi
jmp 0x427210
mov ebx, dword [eax*4 + 0x4731b0]
mov ecx, dword [ebx + 0x40]
cmp ecx, dword [ebp - 0x344]
je 0x4274e2
mov esi, dword [ebp - 0x34c]
mov edx, dword [esi + 0xc]
test edx, edx
js 0x427245
mov esi, dword [ebp - 0x340]
mov edx, dword [esi + edx*4]
cmp ecx, dword [edx + 8]
je 0x4274f9
inc eax
cmp eax, edi
jl 0x427210
mov ebx, dword [ebp - 0x33c]
mov edi, dword [ebp - 0x338]
test ebx, ebx
sete al
test edi, edi
sete cl
or eax, ecx
test al, 1
je 0x4272b6
mov dword [esp], 5
mov eax, str.Error_finding_custom_file_name_to_save
mov dword [esp + 4], eax
call dword [sym.imp.mameplib.dll_lang_message]
mov dword [esp], eax
call fcn.00429af0
mov esi, eax
call fcn.004013e0
mov dword [esp], eax
mov ecx, 0x10
mov edx, 0x4643ac
mov dword [esp + 4], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
call fcn.0044dda5
sub esp, 0x10
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00414600
mov edi, dword [ebp - 0x33c]
mov ecx, 0x104
mov dword [esp + 0xc], eax
lea esi, [ebp - 0x128]
mov eax, str._s_s.ini
mov dword [esp + 4], ecx
mov dword [esp + 0x10], edi
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.0044ff50
mov dword [esp], esi
mov edx, 0x4643ba
mov dword [esp + 4], edx
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x32c], eax
test eax, eax
je 0x42741a
mov ecx, dword [ebp - 0x32c]
mov edx, 0x12
mov esi, 1
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp + 0xc], ecx
mov dword [esp], str._FOLDER_SETTINGS__n
call sub.msvcrt.dll_fwrite
mov ebx, dword [ebp - 0x33c]
mov eax, dword [ebx + 0x4c]
test eax, eax
js 0x42758c
mov esi, dword [ebp - 0x33c]
mov eax, dword [esi + 0x50]
test eax, eax
js 0x4275b7
mov esi, dword [ebp - 0x32c]
mov ebx, 0xf
mov edi, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp + 0xc], esi
xor esi, esi
mov dword [esp], str._n_ROOT_FOLDER__n
call sub.msvcrt.dll_fwrite
call fcn.00401830
cmp eax, esi
jle 0x4273c1
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
call fcn.00402170
mov dword [esp + 4], eax
mov ebx, eax
mov edx, dword [ebp - 0x338]
mov ecx, dword [edx + 0x18]
mov dword [esp], ecx
call fcn.00447f20
test eax, eax
jne 0x4274b5
inc esi
call fcn.00401830
cmp eax, esi
jg 0x427390
mov ecx, dword [0x472f20]
xor esi, esi
mov dword [ebp - 0x334], esi
jmp 0x4273fc
mov eax, dword [ebp - 0x334]
mov edx, dword [0x472f30]
mov ebx, dword [edx + eax*4]
mov eax, dword [ebx + 0xc]
test eax, eax
js 0x4273f6
mov edi, dword [ebp - 0x338]
cmp dword [edx + eax*4], edi
je 0x427501
inc dword [ebp - 0x334]
cmp dword [ebp - 0x334], ecx
jb 0x4273d1
mov ebx, dword [ebp - 0x32c]
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
test eax, eax
je 0x4274a1
mov edx, 1
mov edi, str.Error_while_saving_custom_file__s
lea ebx, [ebp - 0x328]
mov dword [ebp - 0x330], edx
mov esi, 0x10
mov dword [esp + 4], edi
mov dword [esp], 5
call dword [sym.imp.mameplib.dll_lang_message]
mov dword [esp], ebx
lea ecx, [ebp - 0x128]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, 0x1f4
mov dword [esp + 4], eax
call fcn.0044ff50
mov dword [esp + 4], ebx
mov dword [esp], 5
call dword [sym.imp.mameplib.dll_lang_message]
mov dword [esp], eax
call fcn.00429af0
mov edi, eax
call fcn.004013e0
mov dword [esp], eax
mov edx, 0x4643ac
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], edi
call fcn.0044dda5
sub esp, 0x10
xor eax, eax
cmp dword [ebp - 0x330], 0
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [sym.imp.mameplib.dll_drivers]
mov edi, 0x464402
inc esi
mov ecx, dword [edx + ebx*4]
mov ebx, dword [ecx + 8]
mov dword [esp + 4], edi
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x32c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x4273b8
mov edi, dword [ebp - 0x34c]
mov dword [ebp - 0x338], edi
mov dword [ebp - 0x33c], ebx
jmp 0x42724a
mov dword [ebp - 0x338], edx
jmp 0x4274ee
mov esi, dword [ebx]
mov edx, str._n__s__n
xor edi, edi
mov dword [esp + 4], edx
mov dword [esp + 8], esi
mov ecx, dword [ebp - 0x32c]
mov dword [esp], ecx
call sub.msvcrt.dll_fprintf
call fcn.00401830
cmp eax, edi
jle 0x427557
lea esi, [esi]
mov dword [esp], edi
call fcn.00402170
mov dword [esp + 4], eax
mov esi, eax
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call fcn.00447f20
test eax, eax
jne 0x427562
inc edi
call fcn.00401830
cmp eax, edi
jg 0x427530
mov ecx, dword [0x472f20]
jmp 0x4273f6
mov ecx, dword [sym.imp.mameplib.dll_drivers]
mov edx, 0x464402
inc edi
mov eax, dword [ecx + esi*4]
mov esi, dword [eax + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], esi
mov ecx, dword [ebp - 0x32c]
mov dword [esp], ecx
call sub.msvcrt.dll_fprintf
jmp 0x42754e
shl eax, 2
mov edi, str.RootFolderIcon__s_n
neg eax
mov ebx, dword [eax + 0x47356c]
mov dword [esp + 4], edi
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x32c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x427341
shl eax, 2
mov ecx, str.SubFolderIcon__s_n
neg eax
mov eax, dword [eax + 0x47356c]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x32c]
mov dword [esp], edx
call sub.msvcrt.dll_fprintf
jmp 0x427352