Function at 0x439190
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e2f8
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x492984]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x84], ebx
push 0
push 1
lea ecx, [ebx - 0x9c]
push 0
call fcn.0042abf0
mov dword [ebx + 0x90], 0
call fcn.00434420
add dword [ebx + 0x40], eax
lea eax, [ebp - 0x80]
mov edi, dword [sym.imp.byondcore.dll_struct_DMString___cdecl_GetUserConfigFile_char_const__]
push str.macros.dmf
push eax
call edi
push dword [ebp - 0x80]
mov esi, dword [sym.imp.byondwin.dll_int___cdecl_existsFile_char_const__]
mov dword [ebp - 4], 0
call esi
mov ebx, dword [sym.imp.byondcore.dll_public:_void___thiscall_DMString::destructor_void_]
add esp, 0xc
test eax, eax
jne 0x43984f
lea eax, [ebp - 0x90]
push str.default.dms
push eax
call edi
push dword [ebp - 0x90]
mov byte [ebp - 4], 1
call esi
add esp, 0xc
test eax, eax
je 0x439843
push dword [ebp - 0x80]
call dword [sym.imp.byondcore.dll_void___cdecl_MakeFileWriteable_char_const__]
mov edi, dword [sym.imp.byondcore.dll_struct_DMWideStringStub___cdecl_Utf82Wide_char_const__]
lea eax, [ebp - 0x6c]
push 0x467c14
push eax
call edi
mov esi, eax
push dword [ebp - 0x80]
lea eax, [ebp - 0x78]
mov byte [ebp - 4], 2
push eax
call edi
push dword [esi]
push dword [eax]
call dword [sym.imp.MSVCR120.dll__wfopen]
mov esi, dword [sym.imp.byondcore.dll_public:_void___thiscall_DMWideStringStub::destructor_void_]
lea ecx, [ebp - 0x78]
add esp, 0x1c
mov dword [ebp - 0x8c], eax
call esi
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call esi
mov eax, dword [ebp - 0x8c]
test eax, eax
je 0x439843
push eax
call dword [sym.imp.MSVCR120.dll_fclose]
lea eax, [ebp - 0x78]
push 0x4663b0
push eax
call edi
mov esi, eax
push dword [ebp - 0x90]
lea eax, [ebp - 0x8c]
mov byte [ebp - 4], 3
push eax
call edi
push dword [esi]
push dword [eax]
call dword [sym.imp.MSVCR120.dll__wfopen]
mov esi, dword [sym.imp.byondcore.dll_public:_void___thiscall_DMWideStringStub::destructor_void_]
lea ecx, [ebp - 0x8c]
add esp, 0x1c
mov edi, eax
mov dword [ebp - 0x6c], edi
call esi
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 1
call esi
test edi, edi
je 0x439843
push 2
push 0
push edi
call dword [sym.imp.MSVCR120.dll_fseek]
push edi
call dword [sym.imp.MSVCR120.dll_ftell]
push edi
mov esi, eax
call dword [sym.imp.MSVCR120.dll_rewind]
lea ecx, [esi + 1]
push ecx
call sub.MSVCR120.dll_void____cdecl_operator_new___unsigned_int_
push dword [ebp - 0x6c]
mov edi, eax
push esi
push 1
push edi
call dword [sym.imp.MSVCR120.dll_fread]
add esp, 0x28
mov byte [edi + esi], 0
lea ecx, [ebp - 0x70]
push edi
call dword [sym.imp.byondcore.dll_public:_void___thiscall_DMString::constructor_char_const__]
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 4
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::MakeLower_void_]
mov esi, dword [sym.imp.byondcore.dll_public:_int___thiscall_DMString::Find_char_const___int_const]
lea ecx, [ebp - 0x70]
push 0
push str._style_
call esi
push 0
push str.__style_
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x94], eax
call esi
push edi
lea ecx, [ebp - 0x70]
mov esi, eax
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::operator_char_const__]
push edi
call sub.MSVCR120.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [ebp - 0x70]
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::TrimLeft_void_]
lea ecx, [ebp - 0x70]
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::TrimRight_void_]
mov edi, dword [ebp - 0x94]
cmp edi, 0xffffffff
je 0x439431
cmp esi, 0xffffffff
je 0x43940c
cmp esi, edi
jle 0x43940c
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x70]
call dword [sym.imp.byondcore.dll_public:_struct_DMString___thiscall_DMString::Mid_int_]
mov esi, eax
push edi
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x70]
call dword [sym.imp.byondcore.dll_public:_struct_DMString___thiscall_DMString::Left_int_]
push esi
push eax
lea eax, [ebp - 0x94]
mov byte [ebp - 4], 7
push eax
call dword [sym.imp.byondcore.dll_struct_DMString___cdecl_operator_struct_DMString_const___struct_DMString_const__]
add esp, 0xc
push eax
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 8
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::operator_struct_DMString_const__]
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 7
call ebx
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 6
call ebx
jmp 0x439428
push edi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x70]
call dword [sym.imp.byondcore.dll_public:_struct_DMString___thiscall_DMString::Left_int_]
push eax
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 5
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::operator_struct_DMString_const__]
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 4
call ebx
push dword [ebp - 0x6c]
call dword [sym.imp.MSVCR120.dll_fclose]
lea eax, [ebp - 0x88]
push str.macros.dms
push eax
call dword [sym.imp.byondcore.dll_struct_DMString___cdecl_GetUserConfigFile_char_const__]
push dword [ebp - 0x88]
mov byte [ebp - 4], 9
call dword [sym.imp.byondcore.dll_void___cdecl_MakeFileWriteable_char_const__]
mov edi, dword [sym.imp.byondcore.dll_struct_DMWideStringStub___cdecl_Utf82Wide_char_const__]
lea eax, [ebp - 0x7c]
push 0x467c14
push eax
call edi
mov esi, eax
push dword [ebp - 0x88]
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 0xa
push eax
call edi
push dword [esi]
push dword [eax]
call dword [sym.imp.MSVCR120.dll__wfopen]
mov esi, dword [sym.imp.byondcore.dll_public:_void___thiscall_DMWideStringStub::destructor_void_]
lea ecx, [ebp - 0x74]
add esp, 0x28
mov dword [ebp - 0x6c], eax
call esi
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 9
call esi
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x43982e
mov esi, dword [ebp - 0x70]
lea ecx, [ebp - 0x70]
push eax
call dword [sym.imp.byondcore.dll_public:_int___thiscall_DMString::GetLength_void_const]
push eax
push 1
push esi
call dword [sym.imp.MSVCR120.dll_fwrite]
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.MSVCR120.dll_fclose]
mov ecx, dword [ebp - 0x84]
add esp, 0x14
push str.macros.dms
call dword [sym.imp.byondcore.dll_public:_void___thiscall_DungClient::LoadDefaultScript_char_const__]
push dword [ebp - 0x88]
lea eax, [ebp - 0x74]
push eax
call edi
push dword [eax]
call dword [sym.imp.MSVCR120.dll__wunlink]
mov esi, dword [sym.imp.byondcore.dll_public:_void___thiscall_DMWideStringStub::destructor_void_]
lea ecx, [ebp - 0x74]
add esp, 0xc
call esi
lea ecx, [ebp - 0xcc]
call dword [sym.imp.byondwin.dll_public:_void___thiscall_IMacroInfo::constructor_void_]
mov esi, dword [ebp - 0x84]
xor ebx, ebx
add esi, 0x2300
mov byte [ebp - 4], 0xb
mov ecx, esi
mov dword [ebp - 0x3c], str.Northwest
mov dword [ebp - 0x38], str.North
mov dword [ebp - 0x34], str.Northeast
mov dword [ebp - 0x30], str.West
mov dword [ebp - 0x2c], str.Center
mov dword [ebp - 0x28], str.East
mov dword [ebp - 0x24], str.Southwest
mov dword [ebp - 0x20], str.South
mov dword [ebp - 0x1c], str.Southeast
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], str.GamepadDir
mov dword [ebp - 0x6c], ebx
call dword [sym.imp.byondwin.dll_public:_int___thiscall_CArray_struct_IMacroEntry___struct_IMacroEntry__::GetSize_void_const]
test eax, eax
jle 0x43961a
mov edi, dword [sym.imp.byondcore.dll_public:_int___thiscall_DMString::CompareNoCase_char_const__const]
lea esp, [esp]
push ebx
mov ecx, esi
call dword [sym.imp.byondwin.dll_public:_struct_IMacroEntry_____thiscall_CArray_struct_IMacroEntry___struct_IMacroEntry__::operator___int_]
lea esi, [ebp - 0x3c]
mov ecx, dword [eax]
mov eax, str.Northwest
mov dword [ebp - 0x74], ecx
lea ebx, [ecx + 4]
lea esp, [esp]
push eax
mov ecx, ebx
call edi
test eax, eax
je 0x4395c5
mov eax, dword [esi + 4]
add esi, 4
test eax, eax
jne 0x4395b0
jmp 0x4395ca
cmp dword [esi], 0
jne 0x4395f7
mov esi, dword [ebp - 0x74]
mov ecx, ebx
mov edi, dword [ebx]
push 0
mov esi, dword [esi + 8]
call dword [sym.imp.byondcore.dll_public:_int___thiscall_DMString::GetLength_void_const]
dec eax
lea ecx, [ebp - 0xcc]
neg eax
sbb eax, eax
inc eax
push eax
push esi
push edi
call dword [sym.imp.byondwin.dll_public:_int___thiscall_IMacroInfo::Insert_char_const___char_const___int__int_]
mov edi, dword [sym.imp.byondcore.dll_public:_int___thiscall_DMString::CompareNoCase_char_const__const]
mov ebx, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x84]
inc ebx
add esi, 0x2300
mov dword [ebp - 0x6c], ebx
mov ecx, esi
call dword [sym.imp.byondwin.dll_public:_int___thiscall_CArray_struct_IMacroEntry___struct_IMacroEntry__::GetSize_void_const]
cmp ebx, eax
jl 0x439590
lea ecx, [ebp - 0xb0]
call dword [sym.imp.byondwin.dll_public:_void___thiscall_IMacroInfo::constructor_void_]
xor ebx, ebx
mov byte [ebp - 4], 0xc
mov dword [ebp - 0x68], str.UpLeft
mov dword [ebp - 0x64], 0x46ca5c
mov dword [ebp - 0x60], str.UpRight
mov dword [ebp - 0x5c], str.Left
mov dword [ebp - 0x58], str.Face1
mov dword [ebp - 0x54], str.Right
mov dword [ebp - 0x50], str.DownLeft
mov dword [ebp - 0x4c], str.Down
mov dword [ebp - 0x48], str.DownRight
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], str.LeftAnalog
mov dword [ebp - 0x78], ebx
lea esp, [esp]
lea ecx, [ebp - 0x6c]
call dword [sym.imp.byondcore.dll_public:_void___thiscall_DMString::constructor_void_]
mov byte [ebp - 4], 0xd
test ebx, ebx
je 0x4396a9
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x6c]
push str.Gamepad_d
push eax
call dword [sym.imp.byondcore.dll_public:_struct_DMString____cdecl_DMString::Format_char_const__]
add esp, 0xc
jmp 0x4396b7
push str.Gamepad
lea ecx, [ebp - 0x6c]
call dword [sym.imp.byondcore.dll_public:_struct_DMString____thiscall_DMString::operator_char_const__]
xor esi, esi
lea esp, [esp]
mov edi, dword [ebp + esi - 0x68]
test edi, edi
je 0x439742
mov ebx, dword [ebp + esi - 0x3c]
test ebx, ebx
je 0x439742
push 0
lea ecx, [ebp - 0x120]
call dword [sym.imp.byondcore.dll_public:_void___thiscall_IMacroElem::constructor_char_const__]
lea eax, [edi + 7]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x6c]
call dword [sym.imp.byondcore.dll_public:_struct_DMString___thiscall_DMString::operator_char_const__]
push dword [eax]
mov edi, dword [sym.imp.byondcore.dll_public:_struct_IString____thiscall_IString::operator_char_const__]
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 0xf
call edi
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 0xe
call dword [sym.imp.byondcore.dll_public:_void___thiscall_DMString::destructor_void_]
push ebx
lea ecx, [ebp - 0xd8]
call edi
push 0
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0xb0]
call dword [sym.imp.byondwin.dll_public:_int___thiscall_IMacroInfo::Insert_struct_IMacroElem___int_]
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 0xd
call dword [sym.imp.byondcore.dll_public_virtual:_void___thiscall_IMacroElem::destructor_void_]
add esi, 4
cmp esi, 0x2c
jb 0x4396c0
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xc
call dword [sym.imp.byondcore.dll_public:_void___thiscall_DMString::destructor_void_]
mov ebx, dword [ebp - 0x78]
inc ebx
mov dword [ebp - 0x78], ebx
cmp ebx, 1
jl 0x439680
mov ebx, dword [ebp - 0x84]
cmp dword [ebx + 0x2828], 0
jne 0x4397a7
push 0x14
call sub.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x7c], eax
mov byte [ebp - 4], 0x10
test eax, eax
je 0x43979b
push 0
mov ecx, eax
call dword [sym.imp.byondcore.dll_public:_void___thiscall_IMacro::constructor_char_const__]
jmp 0x43979d
xor eax, eax
mov byte [ebp - 4], 0xc
mov dword [ebx + 0x2828], eax
push dword [ebx + 0x2828]
mov esi, dword [sym.imp.byondwin.dll_public:_void___thiscall_IMacroInfo::ToIMacro_struct_IMacro__]
lea ecx, [ebp - 0xcc]
call esi
cmp dword [ebx + 0x2834], 0
jne 0x4397f1
push 0x14
call sub.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x7c], eax
mov byte [ebp - 4], 0x11
test eax, eax
je 0x4397e5
push 0
mov ecx, eax
call dword [sym.imp.byondcore.dll_public:_void___thiscall_IMacro::constructor_char_const__]
jmp 0x4397e7
xor eax, eax
mov byte [ebp - 4], 0xc
mov dword [ebx + 0x2834], eax
push dword [ebx + 0x2834]
lea ecx, [ebp - 0xb0]
call esi
lea ecx, [ebx - 0x9c]
call fcn.0044da00
mov esi, dword [sym.imp.byondwin.dll_public_virtual:_void___thiscall_IMacroInfo::destructor_void_]
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0xb
call esi
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 9
call esi
mov ebx, dword [sym.imp.byondcore.dll_public:_void___thiscall_DMString::destructor_void_]
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 4
call ebx
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
call ebx
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 0
call ebx
lea ecx, [ebp - 0x80]
mov dword [ebp - 4], 0xffffffff
call ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004580b8
mov esp, ebp
pop ebp
ret