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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x664
mov eax, dword [0x495040]
xor eax, esp
mov dword [esp + 0x660], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
mov dword [esp + 0x10], esi
call fcn.0040483c
xor ebx, ebx
lea eax, [esp + 0x34]
push ebx
push eax
mov dword [0x499590], esi
call fcn.00404aa6
cmp dword [eax + 0x18], 8
pop ecx
pop ecx
jb 0x40637d
mov eax, dword [eax + 4]
jmp 0x406380
add eax, 4
cmp eax, ebx
je 0x406395
push 0x104
push eax
push 0x499e68
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.0041bf3a
add esp, 0xc
call fcn.00404679
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 0x190
lea eax, [esp + 0x25c]
push ebx
push eax
call fcn.00460930
add esp, 0xc
lea eax, [esp + 0x258]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
push str.SetProcessDPIAware
push 0x47efb0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x406418
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.00460930
add esp, 0xc
call esi
push eax
call fcn.0040d2ef
push eax
lea esi, [esp + 0x464]
call fcn.0040d0d2
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4064b6
xor eax, eax
push edi
push eax
mov word [esp + 0x260], ax
lea eax, [esp + 0x262]
push eax
call fcn.00460930
add esp, 0xc
push 0x104
lea eax, [esp + 0x25c]
push eax
push 0
call ebx
mov esi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea eax, [esp + 0x258]
push eax
call esi
test eax, eax
je 0x4064b6
lea eax, [esp + 0x258]
push eax
call esi
push eax
lea eax, [esp + 0x464]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4064bb
call fcn.00405983
lea eax, [esp + 0x34]
push str.i18n.json
push eax
call fcn.00404aa6
cmp dword [eax + 0x18], 8
pop ecx
pop ecx
jb 0x4064d7
mov eax, dword [eax + 4]
jmp 0x4064da
add eax, 4
mov ecx, eax
call fcn.00417bc6
test al, al
je 0x4064f5
cmp byte [0x49a800], 7
mov byte [0x499a08], 1
je 0x4064fc
mov byte [0x499a08], 0
push 0
push 1
lea esi, [esp + 0x3c]
call fcn.0040144b
push str.Global4CAA416D_FAF0_4db8_82BA_5BE626145051
call fcn.004044cd
test eax, eax
je 0x40657c
cmp dword [0x4987b8], 2
jne 0x406544
mov eax, dword [0x4987c0]
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406544
mov eax, dword [0x4987c0]
mov ecx, dword [eax + 4]
call fcn.00406022
jmp 0x406711
push 0x10
push ecx
push str.error
push str.common
call fcn.00417c11
add esp, 0xc
push eax
push str.internalUnusable
push 0x47f074
call fcn.00417c11
pop ecx
pop ecx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
inc eax
jmp 0x406711
call fcn.00404be4
xor eax, eax
push edi
mov word [esp + 0x54], ax
xor esi, esi
lea eax, [esp + 0x56]
push esi
push eax
call fcn.00460930
add esp, 0xc
push 0x104
lea eax, [esp + 0x54]
push eax
push dword [esp + 0x18]
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push str.:ghV
lea eax, [esp + 0x54]
push eax
call edi
test eax, eax
jne 0x40670a
push 0x480218
lea eax, [esp + 0x54]
push eax
call edi
test eax, eax
jne 0x40670a
lea eax, [esp + 0x50]
push eax
call fcn.0040e01d
push 0x47f3e0
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [0x4987b8]
xor ebx, ebx
inc ebx
cmp eax, ebx
jne 0x4066b7
mov edi, str.B60D1513_59AD_49cb_A14A_445439DAF42F
push edi
call fcn.004044cd
test eax, eax
je 0x406617
mov eax, ebx
jmp 0x406711
push edi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea eax, [esp + 0x34]
push eax
call fcn.00405d36
pop ecx
cmp dword [esp + 0x48], esi
jne 0x40669f
call fcn.0041cd5a
cmp eax, 6
jne 0x40666f
lea eax, [esp + 0x18]
push eax
lea edi, [esp + 0x54]
call fcn.0040e193
pop ecx
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040306c
push esi
push ebx
lea esi, [esp + 0x20]
call fcn.0040144b
xor esi, esi
cmp dword [esp + 0x48], esi
jne 0x40669f
mov edi, ebx
jmp 0x406690
cmp eax, 7
jne 0x406689
call fcn.00406280
push esi
push ebx
lea esi, [esp + 0x3c]
call fcn.0040144b
jmp 0x40670f
cmp eax, 2
jne 0x406665
xor edi, edi
push esi
push ebx
lea esi, [esp + 0x3c]
call fcn.0040144b
mov eax, edi
jmp 0x406711
cmp dword [esp + 0x4c], 8
mov ecx, dword [esp + 0x38]
jae 0x4066ae
lea ecx, [esp + 0x38]
call fcn.00405644
mov edi, eax
jmp 0x406690
cmp eax, 2
jne 0x4066cb
mov eax, dword [0x4987c0]
mov ecx, dword [eax + 4]
call fcn.00405644
jmp 0x406711
cmp eax, 3
jne 0x40670f
mov eax, dword [0x4987c0]
mov eax, dword [eax + 4]
cmp eax, esi
je 0x40670f
push 0x480340
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40670f
call fcn.00405ef4
mov eax, dword [0x4987c0]
mov eax, dword [eax + 8]
movzx eax, byte [eax]
push eax
push dword [esp + 0x14]
call fcn.004013ca
pop ecx
pop ecx
jmp 0x406711
call fcn.00406280
xor eax, eax
mov ecx, dword [esp + 0x66c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045e86d
mov esp, ebp
pop ebp
ret 0x10