Function at 0x436dce
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Initialize winsock library
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5e0
lea eax, [esp + 0x450]
push ebx
push ebp
push esi
push edi
push 0x190
xor ebx, ebx
mov edi, edx
push ebx
push eax
call fcn.004183a0
add esp, 0xc
push dword [0x47cbb4]
push dword [0x47cbac]
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov esi, 0x47cba8
mov ecx, esi
call fcn.00401be0
push 0x5c
mov ecx, esi
call fcn.004077aa
test eax, eax
jle 0x436e2c
push eax
mov ecx, esi
call fcn.0040778e
lea ecx, [esp + 0x248]
call fcn.0040b6e3
lea ecx, [esp + 0x30]
call fcn.0040b6e3
push dword [esp + 0x24c]
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [esp + 0x248]
call fcn.00401be0
push dword [esp + 0x24c]
lea eax, [esp + 0x34]
push 0x45bcc0
push eax
call fcn.0040c813
mov ebp, dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
add esp, 0xc
push dword [esp + 0x34]
call ebp
mov ebx, dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
cmp eax, 0xffffffff
jne 0x436e9f
push 0
push dword [esp + 0x38]
call esi
jmp 0x436eb3
push 0x80
push dword [esp + 0x38]
call ebx
mov ecx, dword [esp + 0x34]
call fcn.00407654
push dword [esp + 0x24c]
lea eax, [esp + 0x34]
push str._sMetaQuotesWebInstall
push eax
call fcn.0040c813
add esp, 0xc
push dword [esp + 0x34]
call ebp
cmp eax, 0xffffffff
jne 0x436ee1
push 0
push dword [esp + 0x38]
call esi
jmp 0x436ef5
push 0x80
push dword [esp + 0x38]
call ebx
mov ecx, dword [esp + 0x34]
call fcn.00407654
lea eax, [esp + 0x460]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x437083
push dword [esp + 0x24c]
lea eax, [esp + 0x34]
push str._sMetaQuotesCrashes
push eax
call fcn.0040c813
add esp, 0xc
push dword [esp + 0x34]
call ebp
cmp eax, 0xffffffff
jne 0x436f3f
xor ebx, ebx
push ebx
push dword [esp + 0x38]
call esi
jmp 0x436f4c
push 0x80
push dword [esp + 0x38]
call ebx
xor ebx, ebx
push 0x71d4
push str.20_Dec_2017
push 0x6b2
push 0x1f4
push str.mt5setup
push str.MT5CLW
push dword [esp + 0x4c]
call fcn.0040af66
push str.mt5websetup.exe
mov ecx, 0x4a1bf4
call fcn.0040c54b
push str.main
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
mov ebp, 0x4a1590
push eax
mov ecx, ebp
call fcn.0040b259
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push str.MetaTrader_Setup
call fcn.004480a3
add esp, 0x1c
cmp byte [0x4ab0a1], 0
jne 0x436fd8
mov esi, 0x4aa2fc
mov ecx, esi
call fcn.0040d5a7
test al, al
jne 0x436fd8
push 0x400000
push ebp
push 0x40761d
mov ecx, esi
call fcn.0040b1f6
push 0x43708f
call dword [sym.imp.KERNEL32.DLL_SetUnhandledExceptionFilter]
test edi, edi
je 0x436ff1
xor eax, eax
cmp word [edi], bx
cmovne eax, edi
jmp 0x436ff3
mov eax, ebx
push ecx
push eax
call fcn.00439735
lea eax, [esp + 0x460]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x437085
call fcn.00406d7f
xor ebx, ebx
xor ebp, ebp
inc ebx
cmp dword [0x47e838], ebp
jne 0x437048
lea eax, [esp + 0x28]
mov dword [esp + 0x18], ebx
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], ebp
push eax
push 0x47e838
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
push ebp
call dword [sym.imp.ole32.dll_CoInitialize]
push ebp
push ebp
push ebp
push ebp
call dword [sym.imp.USER32.dll_DefWindowProcW]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 8
push eax
mov dword [esp + 0x18], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
sub esp, 0xc
call fcn.00406bb0
call fcn.00406a10
jmp 0x437085
xor ebx, ebx
pop edi
mov al, bl
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret