Function at 0x40fe40
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x500058
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x567e00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x58]
push 0xf
push eax
call fcn.00417040
add esp, 8
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 0
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ffaa
mov edx, dword [ebp - 0x44]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x40fed9
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40fecf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x410002
push edx
push ecx
call fcn.004c6f6f
add esp, 8
lea eax, [ebp - 0x40]
push 0x1f
push eax
call fcn.00417040
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 1
cmovae eax, dword [ebp - 0x40]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00416690
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 2
cmovae eax, dword [ebp - 0x70]
push eax
call fcn.00415150
lea eax, [ebp - 0x88]
push 0x1d
push eax
call fcn.00417040
add esp, 0x1c
mov edx, eax
cmp dword [edx + 0x14], 8
jb 0x40ff30
mov edx, dword [edx]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov ecx, edx
mov byte [ebp - 4], 4
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ff54
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00403a70
mov edx, dword [ebp - 0x74]
mov byte [ebp - 4], 6
cmp edx, 8
jb 0x410012
mov ecx, dword [ebp - 0x88]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x410008
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x410008
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
push 0x516d70
cmovae eax, dword [ebp - 0x58]
push eax
call fcn.00415d50
mov edx, dword [ebp - 0x44]
add esp, 8
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x40fed9
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40fecf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40fecf
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004c6f6f
add esp, 8
xor eax, eax
mov dword [ebp - 0x78], 0
cmp dword [ebp - 0x14], 8
mov word [ebp - 0x88], ax
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push 4
push 0x516d74
push str.Update
mov dword [ebp - 0x74], 7
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, eax
call fcn.004e2050
test al, al
lea ecx, [ebp - 0x40]
mov eax, str.wpsupdate
je 0x41005f
mov eax, 0x516dac
cmp dword [ebp - 0x2c], 8
push 3
cmovae ecx, dword [ebp - 0x40]
push 0x10000001
push esi
push ecx
push eax
call fcn.00412190
mov edx, dword [ebp - 0x14]
add esp, 0x14
cmp edx, 8
jb 0x4100b3
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4100a9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41013d
push edx
push ecx
call fcn.004c6f6f
add esp, 8
mov edx, dword [ebp - 0x5c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x4100fd
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4100f3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41013d
push edx
push ecx
call fcn.004c6f6f
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
cmp edx, 8
jb 0x41014d
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x410143
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x410143
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004c6f6f
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret