Function at 0x421f80
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x174
mov eax, dword [0x4915c0]
xor eax, esp
mov dword [esp + 0x170], eax
push ebx
push esi
push edi
mov edi, ecx
push edi
mov dword [esp + 0x20], edi
call fcn.0041ba20
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [esp + 0x58]
xor esi, esi
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x5c], 0x114
call ebx
cmp dword [esp + 0x5c], 6
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x50]
push edx
sbb eax, eax
add eax, 2
push esi
push eax
mov dword [esp + 0x5c], esi
call sub.Wlanapi.dll_WlanOpenHandle
test eax, eax
jne 0x42229f
mov eax, dword [edi + 0xd0]
lea esi, [edi + 0xe4]
push esi
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov edx, dword [edi + 0x354]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x50]
push ecx
push 0
push 1
push 0
push edx
push 0
push esi
push eax
call sub.Wlanapi.dll_WlanSetProfile
mov ecx, dword [edi + 0x350]
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x358]
cmp eax, 2
mov dword [esp + 0x38], ecx
jne 0x422068
mov esi, dword [edi + 0x448]
mov di, word [edi + 0x44c]
jmp 0x422089
cmp eax, 5
jne 0x42207c
mov esi, dword [edi + 0x44e]
mov di, word [edi + 0x452]
jmp 0x422089
mov esi, dword [edi + 0x454]
mov di, word [edi + 0x458]
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0x178], esi
mov word [esp + 0x17c], di
mov dword [esp + 0x48], 1
mov dword [esp + 0x5c], 0x114
call ebx
cmp dword [esp + 0x5c], 6
jb 0x4220fd
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, 1
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x20]
mov byte [esp + 0x20], 0x80
mov byte [esp + 0x21], 1
mov word [esp + 0x22], 0x14
mov dword [esp + 0x2c], esi
mov word [esp + 0x30], di
mov dword [esp + 0x40], eax
jmp 0x422105
mov dword [esp + 0x40], 0
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
xor ebx, ebx
push ebx
lea edx, [esp + 0x38]
push edx
lea esi, [edi + 0xe4]
push esi
lea ecx, [edi + 0x2fc]
push eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x58], ebx
call sub.Wlanapi.dll_WlanConnect
cmp eax, ebx
je 0x42214d
mov edx, dword [esp + 0xc]
push ebx
lea ecx, [esp + 0x38]
push ecx
push esi
push edx
call sub.Wlanapi.dll_WlanConnect
cmp eax, ebx
jne 0x4222c1
mov dword [esp + 0x14], ebx
jmp 0x422157
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x5c]
push ecx
push 0
push 7
lea eax, [edi + 0xe4]
push eax
push edx
mov dword [esp + 0x2c], 0
call sub.Wlanapi.dll_WlanQueryInterface
test eax, eax
mov ebx, dword [esp + 0x10]
jne 0x42222b
cmp dword [ebx], 1
jne 0x422227
mov eax, 6
lea ecx, [esp + 0x174]
lea edx, [ebx + 0x230]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x4221bf
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x4221a7
test eax, eax
je 0x42221c
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x42220e
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x42221c
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x42220e
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x42221c
movzx esi, byte [edx]
movzx edi, byte [ecx]
sub esi, edi
jne 0x42220e
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x42221c
movzx esi, byte [edx]
movzx eax, byte [ecx]
sub esi, eax
je 0x42221c
test esi, esi
mov eax, 1
jg 0x42221e
or eax, 0xffffffff
jmp 0x42221e
xor eax, eax
test eax, eax
jne 0x422227
lea edi, [eax + 1]
jmp 0x422234
xor edi, edi
jmp 0x422234
xor edi, edi
cmp dword [esp + 0x14], 0xf
je 0x422293
test ebx, ebx
je 0x422246
push ebx
call sub.Wlanapi.dll_WlanFreeMemory
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x1c]
mov esi, 1
cmp dword [eax + 0xe0], esi
jne 0x422269
push eax
call fcn.0041b850
mov esi, eax
sub esi, 1
neg esi
sbb esi, esi
add esi, 1
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 1
jne 0x42227d
test esi, esi
jne 0x4222b7
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, 0x1e
mov dword [esp + 0x14], eax
jl 0x422153
jmp 0x4222c9
mov ecx, dword [esp + 0xc]
push 0
push ecx
call sub.Wlanapi.dll_WlanCloseHandle
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x170]
xor ecx, esp
call fcn.00455843
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x18], 0
jmp 0x4222c9
mov dword [esp + 0x18], 0xffffffff
mov edx, dword [esp + 0xc]
push 0
push edx
call sub.Wlanapi.dll_WlanCloseHandle
mov ecx, dword [esp + 0x17c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00455843
mov esp, ebp
pop ebp
ret