Function at 0x42cfd0
Capabilities:
Check if file exists
Delete file
Get file attributes
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x5ac
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x54
xor eax, eax
lea edi, [esp + 0x24]
mov dword [esp + 0x20], ebp
push 0x5965b8
rep stosd dword es:[edi], eax
push str._sconfigdetails.ini
lea eax, [esp + 0x17c]
push 0xff
push eax
mov dword [esp + 0x28], 0xffffffff
xor ebx, ebx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea ecx, [esp + 0x174]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42d444
lea edx, [esp + 0x174]
push 0x581660
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
cmp edi, ebp
mov dword [esp + 0x14], edi
je 0x42d444
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push edi
push 1
lea eax, [esp + 0x18]
push 4
push eax
call esi
add esp, 0x10
cmp eax, 1
jne 0x42d41f
mov ecx, dword [esp + 0x10]
mov eax, ecx
shl eax, 4
add eax, ecx
lea ecx, [eax + eax*4]
shl ecx, 2
push ecx
call fcn.004c2e90
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x42d41f
mov ecx, dword [esp + 0x10]
push edi
mov eax, ecx
push 1
shl eax, 4
add eax, ecx
lea edx, [eax + eax*4]
shl edx, 2
push edx
push ebx
call esi
add esp, 0x10
cmp eax, 1
jne 0x42d41f
mov ecx, dword [esp + 0x10]
mov eax, ecx
shl eax, 4
add eax, ecx
mov ecx, ebx
lea edx, [eax + eax*4]
shl edx, 2
call fcn.004339d0
lea eax, [esp + 0x274]
push 0x3f
push eax
call fcn.00429870
push ebp
call dword [sym.imp.MSVCRT.dll_time]
mov edx, dword [esp + 0x1c]
add esp, 0xc
cmp edx, ebp
mov dword [esp + 0x1c], eax
jle 0x42d19f
lea esi, [ebx + 4]
mov eax, dword [esi - 4]
test eax, eax
je 0x42d107
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x274]
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x42d130
push str.Others
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x42d146
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x148]
cmp eax, ecx
jl 0x42d146
cmp eax, dword [esi + 0x14c]
jl 0x42d157
mov edx, dword [esp + 0x10]
inc ebp
add esi, 0x154
cmp ebp, edx
jl 0x42d0fc
jmp 0x42d17b
mov eax, ebp
mov ecx, 0x55
shl eax, 4
add eax, ebp
lea edi, [esp + 0x20]
lea edx, [eax + eax*4]
lea esi, [ebx + edx*4]
mov edx, dword [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
cmp ebp, edx
jl 0x42d19f
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x42d19f
mov ecx, eax
lea edi, [esp + 0x20]
shl ecx, 4
add ecx, eax
lea eax, [ecx + ecx*4]
mov ecx, 0x55
lea esi, [ebx + eax*4]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x164]
test eax, eax
jl 0x42d1bd
mov eax, dword [esp + 0x168]
cmp eax, 1
jl 0x42d1bd
cmp eax, 0x10000
jle 0x42d23a
xor ebp, ebp
test edx, edx
jle 0x42d211
lea esi, [ebx + 0x104]
push str.MetaQuotes_Demo.srv
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x42d1ed
mov eax, dword [esp + 0x10]
inc ebp
add esi, 0x154
cmp ebp, eax
jl 0x42d1c9
jmp 0x42d211
mov eax, ebp
lea edi, [esp + 0x20]
shl eax, 4
add eax, ebp
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x10]
cmp ebp, eax
lea esi, [ebx + ecx*4]
mov ecx, 0x55
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
jl 0x42d23a
push ebx
call fcn.004c2eb0
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
lea edx, [esp + 0x174]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5ac
ret
push ebx
call fcn.004c2eb0
mov eax, dword [esp + 0x168]
push 0
push eax
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [esp + 0x178]
add ecx, 0x10
push ecx
call fcn.004c2e90
mov esi, eax
add esp, 0x14
test esi, esi
je 0x42d3ef
mov edx, dword [esp + 0x168]
push edi
push 1
push edx
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x42d3ef
mov ebx, dword [sym.imp.MSVCRT.dll_fclose]
push edi
call ebx
add esp, 4
lea eax, [esp + 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x168]
mov ecx, esi
call fcn.004339d0
lea ecx, [esp + 0x124]
lea edx, [esp + 0x174]
push ecx
push 0x5965b8
push str._sconfig_s
push 0xff
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [esp + 0x188]
push 0x581698
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x1c
test edi, edi
jne 0x42d309
push esi
call fcn.004c2eb0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5ac
ret
mov ecx, dword [esp + 0x168]
push edi
push 1
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
push edi
je 0x42d33a
call ebx
push esi
call fcn.004c2eb0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5ac
ret
call ebx
push esi
call fcn.004c2eb0
lea edx, [esp + 0x12c]
push 0x2e
push edx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 0x10
test eax, eax
je 0x42d35c
mov byte [eax], 0
push 0x5965b8
push str._sconfig_server.ini
lea eax, [esp + 0x17c]
push 0xff
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea ecx, [esp + 0x174]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x42d444
mov ecx, 0x593d48
call fcn.0042ea30
lea edx, [esp + 0x2b4]
mov ecx, 0x593d48
push edx
call fcn.0042f040
lea eax, [esp + 0x124]
push 0x7f
lea ecx, [esp + 0x2d4]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea edx, [esp + 0x2b4]
mov ecx, 0x593d48
mov byte [esp + 0x34f], 0
push edx
call fcn.0042f070
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5ac
ret
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea eax, [esp + 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test esi, esi
je 0x42d444
push esi
call fcn.004c2eb0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5ac
ret
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x174]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp ebx, ebp
je 0x42d444
push ebx
call fcn.004c2eb0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5ac
ret