Function at 0x505420
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x118]
push ebp
push esi
xor ebp, ebp
mov esi, ecx
cmp ebx, ebp
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
jne 0x505457
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x10c
ret 8
mov edi, dword [sym.imp.MSVCRT.dll__snprintf]
push 0x5965b8
push str._sliveupdate.exe
lea eax, [esp + 0x24]
push 0xff
push eax
call edi
add esp, 0x10
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x505706
cmp dword [esp + 0x120], ebp
jne 0x5054e8
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push 0x5a2264
lea ecx, [esi + 0xc]
call fcn.00436360
cmp eax, 1
je 0x505706
cmp eax, ebp
jne 0x505708
mov ecx, dword [esp + 0x10]
mov esi, 0x64
push ecx
mov ecx, dword [esp + 0x18]
mov eax, ecx
cdq
idiv esi
mov eax, 0x51eb851f
push edx
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
push edx
push str.LiveUpdate:_new_version__d._02d_build__d_is_available
jmp 0x505505
push 0xe2
push ebp
push 4
mov dword [esp + 0x20], 0x190
mov dword [esp + 0x1c], 0xe2
push str.LiveUpdate:_started_because_the_current_new_version_is_out_of_date
push ebp
push 0x596558
call fcn.004aa400
add esp, 0x18
lea ecx, [esp + 0x1c]
push 0x5965b8
push str._sprofilesliveupdate.ini
push 0xff
push ecx
call edi
lea edx, [esp + 0x2c]
push 0x581fec
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
cmp esi, ebp
je 0x505706
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push 0x5a2264
push str.owner_s_n
push esi
call edi
add esp, 0xc
push str.programMetaTrader_4_n
push esi
call edi
add esp, 8
push str.mainfileterminal.exe_n
push esi
call edi
add esp, 8
add ebx, 0x1c
mov ecx, 0x593b60
push ebx
call fcn.0042d8e0
mov ebp, eax
test ebp, ebp
jne 0x50559e
push ebx
push str.server_s_n
push esi
call edi
mov ebx, dword [esp + 0x130]
add esp, 0xc
jmp 0x505623
mov ebx, dword [esp + 0x124]
mov eax, dword [ebx + 0x1ec]
test eax, eax
jne 0x5055bf
mov cl, byte [ebx + 0xa4]
lea eax, [ebx + 0xa4]
test cl, cl
jne 0x5055d6
mov cl, byte [ebp + 0xd8]
lea eax, [ebp + 0xd8]
test cl, cl
jne 0x5055d6
mov eax, dword [esp + 0x18]
add eax, 0x14
push eax
push str.server_s_n
push esi
call edi
mov eax, dword [ebp + 0xd0]
add esp, 0xc
test eax, eax
je 0x5055ff
push eax
call fcn.004c2eb0
add esp, 4
mov dword [ebp + 0xd0], 0
mov ecx, dword [ebp + 0x15c]
test ecx, ecx
je 0x50561a
push 1
call fcn.0040ae20
mov dword [ebp + 0x15c], 0
push ebp
call fcn.004c2eb0
add esp, 4
mov ecx, dword [ebx + 8]
push ecx
push str.login_d_n
push esi
call edi
add esp, 0xc
push 0
push str.type_d_n
push esi
call edi
add esp, 0xc
push 0x190
push str.version_d_n
push esi
call edi
add esp, 0xc
push 0xe1
push str.build_d_n
push esi
call edi
mov edx, dword [esp + 0x20]
add esp, 0xc
push edx
push str.detected_version_d_n
push esi
call edi
mov eax, dword [esp + 0x1c]
add esp, 0xc
push eax
push str.detected_build_d_n
push esi
call edi
mov eax, dword [ebx + 0x124]
add esp, 0xc
cmp eax, 1
jne 0x5056c7
lea ecx, [ebx + 0x12c]
push ecx
push str.proxy_server_s_n
push esi
call edi
add esp, 0xc
lea edx, [ebx + 0x1cc]
lea eax, [ebx + 0x1ac]
push edx
push eax
push str.proxy_auth_s:_s_n
push esi
call edi
mov ecx, dword [ebx + 0x128]
add esp, 0x10
push ecx
push str.proxy_type_d_n
push esi
call edi
add esp, 0xc
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea edx, [esp + 0x1c]
push 0x5965b8
push str._sliveupdate.exe
push 0xff
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea eax, [esp + 0x1c]
push 1
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 8