Function at 0x421700
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4cc
mov ebx, dword [0x471e30]
mov dword [ebp - 0x4ac], eax
mov edx, dword [ebp - 0x4ac]
mov dword [ebp - 0x4b0], ebx
mov ecx, dword [edx + 8]
xor edx, edx
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x4219fb
mov edi, dword [ebp - 0x4ac]
mov eax, 0x472ce0
mov dword [ebp - 0x4b4], eax
mov esi, dword [edi + 0x10]
test esi, esi
je 0x4217e1
mov edi, dword [0x471140]
xor ecx, ecx
mov dword [ebp - 0x4c0], ecx
test edi, edi
jle 0x421a63
mov edx, dword [0x578490]
mov dword [ebp - 0x4c4], edx
jmp 0x421786
mov ecx, edi
inc ebx
sub ecx, esi
mov dword [ebp - 0x4c0], ebx
lea edi, [ecx - 1]
test edi, edi
jle 0x4217c5
mov ebx, edi
mov eax, dword [ebp - 0x4c0]
shr ebx, 0x1f
lea esi, [edi + ebx]
mov edx, dword [ebp - 0x4c4]
sar esi, 1
lea ebx, [esi + eax]
lea ecx, [ebx + ebx*2]
mov eax, dword [edx + ecx*8]
mov dword [esp], 0x463d94
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x421a50
jge 0x421774
mov edi, esi
test edi, edi
jg 0x421786
mov eax, 0xffffffff
mov edx, dword [ebp - 0x4c4]
lea edi, [eax + eax*2]
lea eax, [edx + edi*8]
call fcn.0041df80
mov dword [ebp - 0x4b4], eax
mov edi, dword [ebp - 0x4ac]
mov eax, dword [0x472ce8]
mov ebx, dword [edi + 4]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x4b8], esi
mov dword [ebx + 8], eax
mov edx, dword [ebp - 0x4ac]
mov edi, dword [edx + 4]
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x4bc], ecx
mov dword [edi + 0x10], 0
mov esi, dword [ebp - 0x4ac]
mov ebx, dword [esi + 4]
mov edi, dword [esi + 8]
lea esi, [ebp - 0x2e8]
mov eax, ebx
call fcn.00415270
mov eax, dword [ebp - 0x4b4]
call fcn.00415270
mov dword [esp + 4], ebx
mov eax, 0x1c0
lea ebx, [ebp - 0x4a8]
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov dword [esp], ebx
mov ecx, dword [ebp - 0x4b4]
mov edx, 0x1c0
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [0x471280]
mov dword [esp], eax
call dword [sym.imp.mameplib.dll_options_set_datalist]
mov edx, ebx
mov eax, esi
call fcn.004132c0
test eax, eax
sete bl
movzx edx, bl
mov dword [edi + 0x14], edx
mov edi, dword [ebp - 0x4ac]
mov esi, dword [edi + 8]
mov ecx, dword [esi + 0x14]
test ecx, ecx
setne bl
xor eax, eax
cmp dword [ebp - 0x4bc], 0
setne al
test ebx, eax
jne 0x421a08
mov edi, dword [ebp - 0x4ac]
mov esi, dword [ebp - 0x4bc]
mov eax, dword [edi + 4]
mov dword [eax + 0x10], esi
mov ebx, dword [ebp - 0x4ac]
mov edx, dword [ebp - 0x4b8]
mov ecx, dword [ebx + 4]
mov ebx, 0x463e1c
mov dword [ecx + 8], edx
mov edi, dword [ebp - 0x4ac]
mov esi, dword [edi]
mov dword [esp], esi
lea esi, [ebp - 0x128]
call fcn.00428e50
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4b0]
mov dword [esp + 4], ebx
mov ebx, esi
mov dword [esp + 8], eax
mov dword [esp], esi
call sub.msvcrt.dll_sprintf
mov ecx, dword [ebx]
add ebx, 4
lea edx, [ecx - 0x1010101]
not ecx
and edx, ecx
mov ecx, edx
and ecx, 0x80808080
je 0x421910
mov edi, ecx
lea eax, [ebx + 2]
shr edi, 0x10
and edx, 0x8080
cmove ecx, edi
mov dl, cl
cmove ebx, eax
add dl, cl
sbb ebx, 3
sub ebx, esi
cmp ebx, 2
jg 0x421a25
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [eax + esi], 0x696e692e
mov byte [eax + esi + 4], 0
mov ecx, dword [ebp - 0x4b0]
mov dword [esp], ecx
call sub.msvcrt.dll__mkdir
mov edx, dword [ebp - 0x4ac]
mov edi, dword [edx + 8]
mov ebx, dword [edi + 0x14]
test ebx, ebx
je 0x421996
mov eax, dword [edx + 0xc]
test eax, eax
jne 0x421996
mov ebx, dword [edx + 4]
mov edx, dword [ebx + 0x10]
test edx, edx
je 0x421a57
mov dword [esp], esi
mov edi, 0x463607
mov dword [esp + 4], edi
call sub.msvcrt.dll_fopen
test eax, eax
mov ebx, eax
mov edx, 0xffffffff
je 0x4219fb
mov eax, dword [0x471280]
mov dword [esp], eax
call dword [sym.imp.mameplib.dll_options_set_datalist]
mov ecx, dword [ebp - 0x4ac]
mov eax, dword [ecx + 4]
call fcn.0041d190
call dword [sym.imp.mameplib.dll_options_clear_output_mark]
mov esi, dword [ebp - 0x4ac]
mov edx, dword [ebp - 0x4b4]
mov eax, dword [esi + 4]
call fcn.0041fa20
mov dword [esp], ebx
call dword [sym.imp.mameplib.dll_options_output_ini_file_marked]
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
xor edx, edx
add esp, 0x4cc
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x4ac]
mov ecx, dword [edx]
mov dword [esp], str._s:_use_default_with_ips
mov dword [esp + 4], ecx
call fcn.00428ae0
jmp 0x4218b5
mov edx, 0x463e22
lea ecx, [esi + ebx - 2]
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.msvcrt.dll__stricmp
test eax, eax
jne 0x42194f
xor eax, eax
mov byte [ebx + ebp - 0x12a], al
jmp 0x42194f
mov eax, ebx
jmp 0x4217ca
mov dword [esp], esi
call sub.msvcrt.dll__unlink
xor edx, edx
jmp 0x4219fb
mov esi, dword [0x578490]
mov dword [ebp - 0x4c4], esi
jmp 0x4217c5