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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x664
mov eax, dword [0x493040]
xor eax, esp
mov dword [esp + 0x660], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [0x497598], eax
xor ebx, ebx
lea eax, [esp + 0x34]
push ebx
push eax
call fcn.004049d0
cmp dword [eax + 0x18], 8
pop ecx
pop ecx
jb 0x405f63
mov eax, dword [eax + 4]
jmp 0x405f66
add eax, 4
cmp eax, ebx
je 0x405f7b
push 0x104
push eax
push 0x497e70
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.0041b2b1
add esp, 0xc
call fcn.00404654
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.0045f510
add esp, 0xc
lea eax, [esp + 0x50]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
push str.SetProcessDPIAware
push 0x47cfa0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x405ff8
call eax
xor eax, eax
mov edi, 0x206
push edi
mov word [esp + 0x464], ax
lea eax, [esp + 0x466]
push ebx
push eax
call fcn.0045f510
add esp, 0xc
call esi
push eax
call fcn.0040c7ef
push eax
lea esi, [esp + 0x464]
call fcn.0040c5d2
test eax, eax
je 0x406084
xor eax, eax
push edi
mov word [esp + 0x54], ax
lea eax, [esp + 0x56]
push ebx
push eax
call fcn.0045f510
add esp, 0xc
push 0x104
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [esp + 0x50]
push eax
call esi
test eax, eax
je 0x406084
lea eax, [esp + 0x50]
push eax
call esi
push eax
lea eax, [esp + 0x464]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x406089
call fcn.004056aa
lea eax, [esp + 0x34]
push str.i18n.json
push eax
call fcn.004049d0
cmp dword [eax + 0x18], 8
pop ecx
pop ecx
jb 0x4060a5
mov eax, dword [eax + 4]
jmp 0x4060a8
add eax, 4
mov ecx, eax
call fcn.0041707a
test al, al
je 0x4060c3
cmp byte [0x498808], 7
mov byte [0x497a10], 1
je 0x4060c9
mov byte [0x497a10], bl
push ebx
push 1
lea esi, [esp + 0x3c]
call fcn.0040144b
push str.Global4CAA416D_FAF0_4db8_82BA_5BE626145051
call fcn.0040448d
test eax, eax
je 0x406147
cmp dword [0x4967b8], 2
jne 0x406110
mov eax, dword [0x4967c0]
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406110
mov eax, dword [0x4967c0]
mov ecx, dword [eax + 4]
call fcn.00405cd0
jmp 0x406288
push 0x10
push ecx
push str.error
push str.common
call fcn.004170c5
add esp, 0xc
push eax
push str.internalUnusable
push 0x47d064
call fcn.004170c5
pop ecx
pop ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
inc eax
jmp 0x406288
call fcn.00404af3
xor eax, eax
push edi
mov word [esp + 0x25c], ax
lea eax, [esp + 0x25e]
push ebx
push eax
call fcn.0045f510
add esp, 0xc
push 0x104
lea eax, [esp + 0x25c]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x258]
push eax
call fcn.0040d4a8
push 0x47d3d0
lea eax, [esp + 0x25c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [0x4967b8]
cmp eax, 1
jne 0x406233
mov esi, str.B60D1513_59AD_49cb_A14A_445439DAF42F
push esi
call fcn.0040448d
test eax, eax
jne 0x40613f
push esi
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea eax, [esp + 0x34]
push eax
call fcn.00405a0f
pop ecx
cmp dword [esp + 0x48], ebx
jne 0x40621b
lea eax, [esp + 0x18]
push eax
lea edi, [esp + 0x25c]
call fcn.0040d61e
pop ecx
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040306d
push ebx
push 1
lea esi, [esp + 0x20]
call fcn.0040144b
cmp dword [esp + 0x48], ebx
jne 0x40621b
xor edi, edi
inc edi
push ebx
push 1
lea esi, [esp + 0x3c]
call fcn.0040144b
mov eax, edi
jmp 0x406288
cmp dword [esp + 0x4c], 8
mov ecx, dword [esp + 0x38]
jae 0x40622a
lea ecx, [esp + 0x38]
call fcn.004053d1
mov edi, eax
jmp 0x40620b
cmp eax, 2
jne 0x406247
mov eax, dword [0x4967c0]
mov ecx, dword [eax + 4]
call fcn.004053d1
jmp 0x406288
cmp eax, 3
jne 0x406286
mov eax, dword [0x4967c0]
mov eax, dword [eax + 4]
cmp eax, ebx
je 0x406286
push 0x47e0f8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x406286
call fcn.00405bcd
mov eax, dword [0x4967c0]
mov eax, dword [eax + 8]
movzx eax, byte [eax]
push eax
push dword [esp + 0x14]
call fcn.004013ca
pop ecx
pop ecx
jmp 0x406288
xor eax, eax
mov ecx, dword [esp + 0x66c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045d55f
mov esp, ebp
pop ebp
ret 0x10