Function at 0x40c0a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x57c
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push eax
call fcn.00414940
mov eax, dword [0x42868c]
mov ebp, dword [esp + 0x594]
add esp, 4
test eax, 0x800000
je 0x40c141
xor ecx, ecx
xor edx, edx
mov cl, byte [ebp + 0xb]
mov dl, byte [ebp + 0xa]
xor eax, eax
push ecx
mov al, byte [ebp + 9]
push edx
xor ecx, ecx
push eax
mov cl, byte [ebp + 8]
xor edx, edx
mov dl, byte [ebp + 7]
xor eax, eax
mov al, byte [ebp + 6]
push ecx
push edx
xor ecx, ecx
mov cl, byte [ebp + 5]
push eax
xor edx, edx
xor eax, eax
mov dl, byte [ebp + 4]
mov al, byte [ebp + 3]
push ecx
push edx
xor ecx, ecx
push eax
mov cl, byte [ebp + 2]
xor edx, edx
mov dl, byte [ebp + 1]
xor eax, eax
mov al, byte [ebp]
push ecx
mov ecx, dword [esp + 0x5bc]
push edx
push eax
push ecx
lea edx, [esp + 0x1c0]
push str._ld:__02x__02x__02x__02x__02x__02x__02x__02x__02x__02x__02x__02x
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
push 1
lea eax, [esp + 0x1cc]
push 0
push eax
call fcn.00409af0
add esp, 0x48
mov ebx, dword [sym.imp.WS2_32.dll_htons]
push 0x888e
call ebx
cmp word [ebp + 0xc], ax
jne case.0x40c1b2.2
cmp dword [esp + 0x594], 0x1e
jl case.0x40c1b2.2
mov al, byte [ebp + 0xf]
test al, al
jne case.0x40c1b2.2
cmp dword [0x41e16c], 0x64
jge case.0x40c1b2.2
lea esi, [ebp + 6]
mov ecx, 3
mov edi, 0x422a26
xor edx, edx
repe cmpsw word [esi], word es:[edi]
je case.0x40c1b2.2
call dword [sym.imp.MSVCRT.dll_clock]
mov dword [0x4290d0], eax
xor eax, eax
mov al, byte [ebp + 0x12]
lea ecx, [eax - 1]
cmp ecx, 3
ja case.default.0x40c1b2
jmp dword [ecx*4 + 0x40c958]
mov al, byte [ebp + 0x16]
cmp al, 1
jne 0x40c345
mov eax, dword [0x41e16c]
cmp eax, 3
jne 0x40c1dd
mov dword [0x42953c], 0x5a
jmp 0x40c289
cmp eax, 2
jne 0x40c1f2
call fcn.0040bb90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
xor ecx, ecx
cmp eax, ecx
je 0x40c206
cmp eax, 1
jne case.0x40c1b2.2
jmp 0x40c289
mov edx, dword [esp + 0x594]
xor eax, eax
cmp edx, 0x1f4
setle al
mov dword [0x429574], eax
mov eax, dword [0x42868c]
test ah, 4
je 0x40c22d
mov dword [0x429574], ecx
mov al, byte [0x429448]
mov dword [0x42943c], 2
test al, 2
mov dword [0x41e16c], 1
mov dword [0x429544], ecx
je 0x40c26c
mov ecx, dword [0x41e340]
mov dx, word [0x41e344]
mov dword [0x422a20], ecx
mov word [0x422a24], dx
jmp 0x40c289
mov eax, dword [ebp + 6]
mov dword [0x422a20], eax
mov cx, word [ebp + 0xa]
mov word [0x422a24], cx
mov dword [0x42943c], 3
mov ecx, 0x102
xor eax, eax
mov edi, 0x422a2e
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xd
push ecx
call ebx
mov word [0x422a30], ax
mov byte [0x422a2f], 0
mov byte [0x422a2e], 1
mov byte [0x422a32], 2
mov dl, byte [ebp + 0x13]
mov word [0x422a34], ax
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x422a37
mov eax, ecx
mov byte [0x422a33], dl
shr ecx, 2
mov byte [0x422a36], 1
mov dx, word [0x41ef9c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, 0x422a38
mov word [ecx], dx
mov eax, dword [0x422f3c]
test eax, eax
jne 0x40c330
mov eax, dword [0x422f44]
mov dword [ecx + 4], eax
push 0
call fcn.0040bd50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
cmp al, 4
jne 0x40c775
mov al, byte [ebp + 0x17]
test al, al
je 0x40c759
cmp al, 0x20
ja 0x40c759
cmp dword [0x41e16c], 1
jne case.0x40c1b2.2
mov ecx, 0x102
xor eax, eax
mov edi, 0x422a2e
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0x1e
push ecx
call ebx
mov word [0x422a30], ax
mov byte [0x422a2f], 0
mov byte [0x422a2e], 1
mov byte [0x422a32], 2
mov cl, byte [ebp + 0x13]
mov word [0x422a34], ax
mov byte [0x422a33], cl
lea edi, [esp + 0x2a]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov dl, byte [ebp + 0x13]
lea esi, [esp + 0x2a]
not ecx
dec ecx
mov byte [0x422a37], dl
mov eax, ecx
mov edx, ecx
mov edi, 0x422a38
lea ebx, [ebp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov esi, ebx
mov cl, byte [ebp + 0x17]
lea edi, [eax + 0x422a38]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov cl, byte [ebp + 0x17]
lea edx, [ecx + eax + 1]
push edx
push 0x422a37
call fcn.00405f50
mov eax, dword [0x424dcc]
mov ecx, dword [0x424dd0]
mov dword [0x422a38], eax
mov dword [0x422a3c], ecx
mov dword [0x428355], eax
mov dword [0x428359], ecx
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
mov esi, dword [0x424dd8]
mov edx, dword [0x424dd4]
not ecx
dec ecx
mov dword [0x422a44], esi
mov eax, ecx
mov dword [0x428361], esi
lea esi, [esp + 0x10]
mov edi, 0x422a48
shr ecx, 2
mov dword [0x422a40], edx
mov byte [0x422a36], 4
mov byte [0x422a37], 0x10
mov dword [0x42835d], edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp byte [ebp + 0x17], 0x10
jne 0x40c4d3
mov cx, word [ebp + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp ax, 0x1a
jb 0x40c4d3
lea edx, [ebp + 0x1c]
mov eax, dword [ebp + 0x1c]
mov dword [0x420530], eax
mov ecx, dword [edx + 4]
mov dword [0x420534], ecx
mov eax, dword [edx + 8]
mov dword [0x420538], eax
mov eax, dword [edx + 0xc]
mov dword [0x42053c], eax
jmp 0x40c4e9
xor eax, eax
mov dword [0x42053c], eax
mov dword [0x420530], eax
mov dword [0x420534], eax
mov dword [0x420538], eax
cmp ah, 0x82
je 0x40c661
xor ecx, ecx
mov dword [0x420530], ecx
mov dword [0x420534], ecx
mov dword [0x420538], ecx
mov dword [0x42053c], ecx
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea edi, [esp + 0x10]
mov byte [ecx + 0x422a47], al
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov cx, word [0x41ef9c]
add ebp, 0x422a49
mov word [ebp], cx
mov byte [ebp + 2], 1
mov eax, dword [0x422f3c]
test eax, eax
jne 0x40c554
mov edx, dword [0x422f44]
mov dword [ebp + 4], edx
mov cl, byte [ebp + 3]
mov byte [ebp + 2], 2
and cl, 0xfd
mov byte [ebp + 3], cl
mov al, byte [0x42053f]
test al, 4
je 0x40c617
lea edi, [esp + 0x2a]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edx, ecx
cmp edx, 0x10
jle 0x40c588
mov edx, 0x10
mov ecx, edx
lea esi, [esp + 0x2a]
mov eax, ecx
mov edi, 0x422a38
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x10
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x10
lea edi, [edx + 0x422a38]
sub ecx, edx
push ebx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
call fcn.00405f50
add esp, 8
xor eax, eax
mov cl, byte [eax + 0x424dcc]
mov bl, byte [eax + 0x422a38]
xor bl, cl
mov byte [eax + 0x422a38], bl
inc eax
cmp eax, 0x10
jl 0x40c5cb
mov edx, dword [0x422a38]
mov eax, dword [0x422a3c]
mov ecx, dword [0x422a40]
mov dword [0x428355], edx
mov edx, dword [0x422a44]
mov dword [0x428359], eax
mov dword [0x42835d], ecx
mov dword [0x428361], edx
or byte [ebp + 3], 2
mov ecx, dword [0x429544]
mov eax, 2
test ecx, ecx
mov dword [0x42943c], eax
mov dword [0x41e16c], eax
je 0x40c636
or dword [0x429448], eax
mov eax, dword [0x42868c]
test ah, 2
je 0x40c64c
mov eax, dword [0x429448]
and al, 0xfd
mov dword [0x429448], eax
push 0
call fcn.0040bd50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
mov cx, word [0x42053e]
test cl, cl
je 0x40c706
mov esi, dword [esp + 0x594]
xor eax, eax
mov al, cl
lea edx, [eax + 0x2c]
cmp esi, edx
jl 0x40c706
mov ecx, eax
lea esi, [ebp + 0x2c]
mov edx, ecx
lea edi, [esp + 0x7c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x80], 0
xor esi, esi
lea eax, [esp + 0x80]
push esi
push eax
call fcn.00409af0
add esp, 0xc
mov dword [0x41e16c], 0x64
mov dword [0x42943c], esi
mov dword [0x42842c], esi
push 1
push 1
push 0x4e
mov byte [0x41e1c6], 0
call fcn.004047d0
add esp, 4
push eax
call fcn.00409af0
push 0x4e
call fcn.004047d0
push eax
call fcn.004051d0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
test ch, 1
je 0x40c50c
push 1
xor eax, eax
push 1
push 0x5c
mov dword [0x41e16c], 0x64
mov dword [0x42943c], eax
mov dword [0x42842c], eax
mov byte [0x41e1c6], al
call fcn.004047d0
add esp, 4
push eax
call fcn.00409af0
push 0x5c
call fcn.004047d0
push eax
call fcn.004051d0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
push 1
push 0
push str.pRecvData__eap_data.data0_or__32
call fcn.00409af0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
cmp al, 2
jne case.0x40c1b2.2
cmp dword [0x41e16c], 2
jne case.0x40c1b2.2
mov ax, word [ebp + 0x10]
push eax
call ebx
mov cx, word [ebp + 0x10]
mov dx, ax
and edx, 0xffff
cmp cx, word [ebp + 0x14]
jne case.0x40c1b2.2
mov ecx, dword [esp + 0x594]
lea eax, [edx + 0x12]
cmp ecx, eax
jl case.0x40c1b2.2
cmp edx, 5
jle case.0x40c1b2.2
test byte [0x429520], 1
jne 0x40c827
mov ebx, dword [0x429520]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
or ebx, 1
sub dl, 5
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x429520], ebx
add ecx, 0x422a49
and edx, 0x7f
lea esi, [ebp + 0x17]
lea edi, [esp + 0x7c]
mov bl, byte [ecx + 3]
or bl, 1
mov byte [ecx + 3], bl
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x7c]
mov byte [esp + edx + 0x7c], 0
push ecx
call fcn.0040ea60
add esp, 4
mov dl, byte [ebp + 0x13]
push 0
mov byte [0x422a33], dl
call fcn.0040bd50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
cmp dword [0x41e16c], 2
jne case.0x40c1b2.2
call fcn.0040bb90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
mov eax, dword [0x41e16c]
cmp eax, 4
jne 0x40c8cc
push 1
push 1
push 0x4f
mov dword [0x41e16c], 0x64
mov dword [0x42943c], 0
call fcn.004047d0
add esp, 4
push eax
call fcn.00409af0
push str.802.1x_login_error
call fcn.004051d0
mov eax, dword [0x42868c]
add esp, 0x10
test ah, 0x40
je case.0x40c1b2.2
mov eax, dword [0x428cd4]
push 0
push 0
push 2
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
cmp eax, 2
jne case.0x40c1b2.2
mov eax, dword [0x429520]
xor esi, esi
cmp eax, esi
jne 0x40c8f3
push 1
push 1
push 0x4e
call fcn.004047d0
add esp, 4
push eax
call fcn.00409af0
add esp, 0xc
push str.802.1x_login_error2
mov dword [0x41e16c], 0x64
mov dword [0x42943c], esi
mov dword [0x42842c], esi
mov byte [0x41e1c6], 0
call fcn.004051d0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret
push eax
lea ecx, [esp + 0x40]
push 0x41ef40
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push 1
lea edx, [esp + 0x4c]
push 0
push edx
call fcn.00409af0
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x57c
ret