Function at 0x40658f
Capabilities:
Check if file exists
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x68c
mov eax, dword [0x498040]
xor eax, esp
mov dword [esp + 0x688], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
mov dword [esp + 0x10], esi
call fcn.0040497a
xor ebx, ebx
lea eax, [esp + 0x34]
push ebx
push eax
mov dword [0x49c590], esi
call fcn.00401f87
cmp dword [eax + 0x18], 8
pop ecx
pop ecx
jb 0x4065da
mov eax, dword [eax + 4]
jmp 0x4065dd
add eax, 4
cmp eax, ebx
je 0x4065f2
push 0x104
push eax
push 0x49cc60
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push ebx
push 1
lea esi, [esp + 0x3c]
call fcn.0040144b
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call esi
mov dword [esp + 0x14], eax
push 4
lea eax, [esp + 0x18]
push eax
push 0x80001160
call fcn.0041e3a3
add esp, 0xc
call fcn.004047b2
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x190
lea eax, [esp + 0x54]
push ebx
push eax
call fcn.00462d50
add esp, 0xc
lea eax, [esp + 0x50]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
push str.SetProcessDPIAware
push 0x480fb0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40666f
call eax
xor eax, eax
mov edi, 0x206
push edi
mov word [esp + 0x48c], ax
lea eax, [esp + 0x48e]
push ebx
push eax
call fcn.00462d50
add esp, 0xc
call esi
push eax
lea eax, [esp + 0x54]
push eax
mov eax, 0x40f052
call fcn.0040f117
neg eax
sbb eax, eax
and eax, dword [esp + 0x68]
lea esi, [esp + 0x488]
push eax
call fcn.0040f27e
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x406710
xor eax, eax
push edi
push eax
mov word [esp + 0x58], ax
lea eax, [esp + 0x5a]
push eax
call fcn.00462d50
add esp, 0xc
push 0x104
lea eax, [esp + 0x54]
push eax
push 0
call ebx
mov esi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [esp + 0x50]
push eax
call esi
test eax, eax
je 0x406710
lea eax, [esp + 0x50]
push eax
call esi
push eax
lea eax, [esp + 0x48c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x406715
call fcn.00405d00
lea eax, [esp + 0x34]
push str.i18n.json
push eax
call fcn.00401f87
cmp dword [eax + 0x18], 8
pop ecx
pop ecx
jb 0x406731
mov eax, dword [eax + 4]
jmp 0x406734
add eax, 4
mov ecx, eax
call fcn.0041a29f
test al, al
je 0x40674f
cmp byte [0x49d800], 7
mov byte [0x49ca08], 1
je 0x406756
mov byte [0x49ca08], 0
push 0
push 1
lea esi, [esp + 0x3c]
call fcn.0040144b
push str.Global4CAA416D_FAF0_4db8_82BA_5BE626145051
call fcn.00404606
test eax, eax
je 0x4067d6
cmp dword [0x49b7b8], 2
jne 0x40679e
mov eax, dword [0x49b7c0]
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40679e
mov eax, dword [0x49b7c0]
mov ecx, dword [eax + 4]
call fcn.0040627f
jmp 0x40697e
push 0x10
push ecx
push str.error
push str.common
call fcn.0041a2ea
add esp, 0xc
push eax
push str.internalUnusable
push 0x481074
call fcn.0041a2ea
pop ecx
pop ecx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
inc eax
jmp 0x40697e
call fcn.00404c77
xor eax, eax
push edi
mov word [esp + 0x284], ax
xor esi, esi
lea eax, [esp + 0x286]
push esi
push eax
call fcn.00462d50
add esp, 0xc
push 0x104
lea eax, [esp + 0x284]
push eax
push dword [esp + 0x18]
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push str.:ghV
lea eax, [esp + 0x284]
push eax
call edi
test eax, eax
jne 0x406977
push 0x482220
lea eax, [esp + 0x284]
push eax
call edi
test eax, eax
jne 0x406977
lea eax, [esp + 0x280]
push eax
call fcn.0041029b
push 0x4813e0
lea eax, [esp + 0x284]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [0x49b7b8]
xor ebx, ebx
inc ebx
cmp eax, ebx
jne 0x406929
mov edi, str.B60D1513_59AD_49cb_A14A_445439DAF42F
push edi
call fcn.00404606
test eax, eax
je 0x406886
mov eax, ebx
jmp 0x40697e
push edi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea eax, [esp + 0x34]
push eax
call fcn.004060c1
pop ecx
cmp dword [esp + 0x48], esi
jne 0x406911
call fcn.0041f16c
cmp eax, 6
jne 0x4068e1
lea eax, [esp + 0x18]
push eax
lea edi, [esp + 0x284]
call fcn.00410411
pop ecx
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040310d
push esi
push ebx
lea esi, [esp + 0x20]
call fcn.0040144b
xor esi, esi
cmp dword [esp + 0x48], esi
jne 0x406911
mov edi, ebx
jmp 0x406902
cmp eax, 7
jne 0x4068fb
call fcn.004064dd
push esi
push ebx
lea esi, [esp + 0x3c]
call fcn.0040144b
jmp 0x40697c
cmp eax, 2
jne 0x4068d7
xor edi, edi
push esi
push ebx
lea esi, [esp + 0x3c]
call fcn.0040144b
mov eax, edi
jmp 0x40697e
cmp dword [esp + 0x4c], 8
mov ecx, dword [esp + 0x38]
jae 0x406920
lea ecx, [esp + 0x38]
call fcn.004059c1
mov edi, eax
jmp 0x406902
cmp eax, 2
jne 0x40693d
mov eax, dword [0x49b7c0]
mov ecx, dword [eax + 4]
call fcn.004059c1
jmp 0x40697e
cmp eax, 3
jne 0x40697c
mov eax, dword [0x49b7c0]
mov eax, dword [eax + 4]
cmp eax, esi
je 0x40697c
push 0x482348
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40697c
mov eax, dword [0x49b7c0]
mov eax, dword [eax + 8]
movzx eax, byte [eax]
push eax
push dword [esp + 0x14]
call fcn.004013ca
pop ecx
pop ecx
jmp 0x40697e
call fcn.004064dd
xor eax, eax
mov ecx, dword [esp + 0x694]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00460c7e
mov esp, ebp
pop ebp
ret 0x10