Function at 0x828930
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov edi, dword [esp + 0x18]
cmp dword [esp + 0x20], 0
mov esi, ecx
mov dword [esp], edx
je 0x828a8a
mov edx, fcn.007af6a0
xor eax, eax
movzx ebx, byte [0xbba02b]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt ebx, eax
jb 0x828a7a
mov al, byte [0xbba02b]
xor ecx, ecx
cmp edx, 3
mov ah, 1
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba02b], ah
jne 0x82897a
mov ecx, fcn.007af6a0
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2 + 2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8289ea
xor eax, eax
cmp ecx, 3
movzx ebx, byte [0xbba02b]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 2]
bt ebx, eax
jae 0x8289c8
jmp 0x828a7a
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbba02b]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x828a51
mov ecx, fcn.007af6a0
xor eax, eax
mov ebx, dword [str._f5BUt]
mov dl, 1
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x82d
lea ecx, [eax + ecx*2 + 0x110c63d2]
xor ebx, ecx
mov dword [str._f5BUt], ebx
not ebx
imul ebx, ecx
and cl, 7
shl dl, cl
xor dword [0xbba024], ebx
or byte [0xbba02b], dl
mov eax, fcn.007af6a0
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbba02b], al
push 5
push str._f5BUt
push esi
call fcn.00782dd0
add esp, 0xc
cmp edi, 2
jl 0x828be3
mov edx, fcn.0080e760
mov ebp, edi
mov edi, fcn.0080e760
xor eax, eax
movzx ebx, byte [0xbba033]
or edx, 2
xor edi, 2
mov ecx, edx
add ecx, edi
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt ebx, eax
jb 0x828bd1
mov al, byte [0xbba033]
mov ebx, edx
xor ecx, ecx
mov ah, 1
add ebx, edi
sete cl
mov ebx, ecx
not ebx
lea ecx, [ebx + ecx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba033], ah
jne 0x828acf
mov ecx, fcn.0080e760
mov edx, fcn.0080e760
xor ebx, ebx
movzx eax, al
or ecx, 2
xor edx, 2
mov edi, ecx
add edi, edx
sete bl
mov edi, ebx
not ebx
lea ebx, [ebx + edi*2]
and bl, 7
xor bl, 7
movzx edi, bl
bt eax, edi
jae 0x828b4c
mov edi, ecx
xor eax, eax
add edi, edx
movzx edi, byte [0xbba033]
sete al
mov ebx, eax
not ebx
lea eax, [ebx + eax*2]
and al, 7
movzx eax, al
bt edi, eax
jae 0x828b26
jmp 0x828bd1
xor eax, eax
add ecx, edx
movzx edx, byte [0xbba033]
sete al
mov ecx, eax
not ecx
lea eax, [ecx + eax*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x828ba3
mov eax, fcn.0080e760
mov ecx, fcn.0080e760
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
xor eax, 0x70a8dba7
lea ecx, [eax + edx*2 + 0x830]
mov al, 1
xor dword [0xbba02c], ecx
and cl, 7
shl al, cl
or byte [0xbba033], al
mov eax, fcn.0080e760
mov ecx, fcn.0080e760
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
not eax
lea ecx, [eax + edx*2]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbba033], al
push 1
push 0xbba02c
push esi
call fcn.00782dd0
add esp, 0xc
jmp 0x828bee
mov ebp, edi
cmp edi, 1
jne 0x828c80
mov edi, fcn.007c92a0
xor ebx, ebx
not edi
and edi, 1
test ebx, ebx
je 0x828d04
mov eax, edi
movzx ecx, byte [0xbba03b]
add eax, fcn.007c92a0
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x828cf4
mov al, byte [0xbba03b]
mov ecx, edi
mov dl, 1
add ecx, fcn.007c92a0
sete cl
or cl, 4
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbba03b], dl
jne 0x828c26
mov ecx, edi
movzx eax, al
add ecx, fcn.007c92a0
sete cl
or cl, 4
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x828c94
mov eax, edi
movzx ecx, byte [0xbba03b]
add eax, fcn.007c92a0
sete al
or al, 4
movzx eax, al
bt ecx, eax
jae 0x828c63
jmp 0x828cf4
push 1
push dword [esp + 0x28]
push esi
call fcn.00782dd0
add esp, 0x10
jmp 0x8292c1
mov eax, edi
movzx ecx, byte [0xbba03b]
add eax, fcn.007c92a0
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x828cda
mov eax, edi
xor ecx, ecx
add eax, fcn.007c92a0
mov al, 1
sete cl
or ecx, 0x9f8705d4
add ecx, 0x410
xor dword [0xbba034], ecx
and cl, 7
shl al, cl
or byte [0xbba03b], al
mov eax, edi
add eax, fcn.007c92a0
mov al, 0xfe
sete cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbba03b], al
push 1
push 0xbba034
push esi
call fcn.00782dd0
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp]
lea edx, [ebx + eax]
call fcn.008286e0
push eax
push esi
call fcn.00783000
add esp, 8
inc ebx
cmp ebx, ebp
jne 0x828bfa
mov ebx, ebp
cmp ebp, 1
jg 0x828d38
push 1
push dword [esp + 0x28]
jmp 0x828f69
mov edx, fcn.007fc460
movzx ecx, byte [0xbba043]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
or al, 4
add al, 0x44
and al, 7
movzx eax, al
bt ecx, eax
jb 0x828e42
mov al, byte [0xbba043]
cmp edx, 3
mov ah, 1
sete cl
or cl, 4
add cl, 0x44
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba043], ah
jne 0x828d67
mov ecx, fcn.007fc460
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
or dl, 4
add dl, 0x44
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x828dce
cmp ecx, 3
movzx edx, byte [0xbba043]
sete al
or al, 4
add al, 0x44
and al, 7
movzx eax, al
bt edx, eax
jae 0x828db1
jmp 0x828e42
cmp ecx, 3
movzx ecx, byte [0xbba043]
sete al
or al, 4
add al, 0x44
and al, 7
movzx eax, al
bt ecx, eax
jb 0x828e1b
mov eax, fcn.007fc460
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
mov al, 1
sete cl
or ecx, 0x7c483354
add ecx, 0x844
xor dword [0xbba03c], ecx
and cl, 7
shl al, cl
or byte [0xbba043], al
mov eax, fcn.007fc460
imul eax, eax
and eax, 3
cmp eax, 3
mov al, 0xfe
sete cl
or cl, 4
add cl, 0x44
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbba043], al
mov edx, fcn.007be110
mov edi, fcn.007be110
movzx ecx, byte [0xbba04b]
or edx, 2
xor edi, 2
mov eax, edx
add eax, edi
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x828f43
mov al, byte [0xbba04b]
mov ecx, edx
mov ah, 1
add ecx, edi
sete cl
or cl, 6
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba04b], ah
jne 0x828e73
mov ecx, fcn.007be110
mov edx, fcn.007be110
or ecx, 2
xor edx, 2
mov edi, ecx
add edi, edx
sete ah
or ah, 6
xor ah, 7
movzx edi, ah
movzx eax, al
bt eax, edi
jae 0x828ed2
mov eax, ecx
movzx edi, byte [0xbba04b]
add eax, edx
sete al
or al, 6
movzx eax, al
bt edi, eax
jae 0x828eb8
jmp 0x828f43
add ecx, edx
movzx ecx, byte [0xbba04b]
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x828f1e
mov eax, fcn.007be110
mov edx, fcn.007be110
xor ecx, ecx
xor edx, 2
or eax, 2
add eax, edx
mov al, 1
sete cl
or ecx, 0x80eb7866
add ecx, 0xb00
xor dword [0xbba044], ecx
and cl, 7
shl al, cl
or byte [0xbba04b], al
mov eax, fcn.007be110
mov ecx, fcn.007be110
xor ecx, 2
or eax, 2
add eax, ecx
mov al, 0xfe
sete cl
or cl, 6
xor cl, 7
rol al, cl
and byte [0xbba04b], al
push 1
push 0xbba03c
push esi
call fcn.00782dd0
add esp, 0xc
push 1
push dword [esp + 0x28]
push esi
call fcn.00782dd0
add esp, 0xc
push 1
push 0xbba044
push esi
call fcn.00782dd0
add esp, 0xc
mov ebp, fcn.007fa330
xor edi, edi
imul ebp, ebp
and ebp, 3
test edi, edi
je 0x829062
mov edx, fcn.00799550
movzx ecx, byte [0xbba053]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x829052
mov al, byte [0xbba053]
cmp edx, 2
mov ah, 1
sete cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba053], ah
jne 0x828fb2
cmp edx, 2
movzx eax, al
sete cl
or cl, 4
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x828ffe
cmp edx, 2
movzx ecx, byte [0xbba053]
sete al
or al, 4
movzx eax, al
bt ecx, eax
jae 0x828fe5
jmp 0x829052
cmp edx, 2
movzx ecx, byte [0xbba053]
sete al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x82903c
xor ecx, ecx
cmp edx, 2
mov al, 1
sete cl
or ecx, 0x49b5da0
add ecx, 0x48c
xor dword [0xbba04c], ecx
and cl, 7
shl al, cl
or byte [0xbba053], al
cmp edx, 2
mov al, 0xfe
sete cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbba053], al
push 1
push 0xbba04c
push esi
call fcn.00782dd0
add esp, 0xc
xor eax, eax
cmp ebp, 2
movzx edx, byte [0xbba05b]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x829151
mov al, byte [0xbba05b]
xor ecx, ecx
cmp ebp, 2
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 2]
mov dl, 1
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbba05b], dl
jne 0x829088
xor ecx, ecx
cmp ebp, 2
movzx eax, al
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 2]
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x8290ea
xor eax, eax
cmp ebp, 2
movzx edx, byte [0xbba05b]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jae 0x8290cb
jmp 0x829151
xor eax, eax
cmp ebp, 2
movzx edx, byte [0xbba05b]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x829133
xor eax, eax
cmp ebp, 2
sete al
mov ecx, eax
not ecx
and ecx, 0x601
lea ecx, [eax + ecx*2 - 0x1c5fe06]
mov al, 1
xor dword [0xbba054], ecx
and cl, 7
shl al, cl
or byte [0xbba05b], al
xor eax, eax
cmp ebp, 2
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbba05b], al
push 1
push 0xbba054
push esi
call fcn.00782dd0
add esp, 0xc
inc edi
cmp edi, ebx
jne 0x828f7f
cmp ebx, 2
jl 0x8292be
mov edx, fcn.00815080
mov edi, fcn.00815080
xor eax, eax
movzx ebx, byte [0xbba063]
or edx, 2
xor edi, 2
mov ecx, edx
add ecx, edi
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2]
and al, 7
movzx eax, al
bt ebx, eax
jb 0x8292b2
mov al, byte [0xbba063]
mov ebx, edx
xor ecx, ecx
mov ah, 1
add ebx, edi
sete cl
mov ebx, ecx
not ebx
lea ecx, [ecx + ebx*2]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba063], ah
jne 0x8291ad
mov ecx, fcn.00815080
mov edx, fcn.00815080
xor ebx, ebx
movzx eax, al
or ecx, 2
xor edx, 2
mov edi, ecx
add edi, edx
sete bl
mov edi, ebx
not ebx
lea ebx, [edi + ebx*2]
and bl, 7
xor bl, 7
movzx edi, bl
bt eax, edi
jae 0x82922a
mov edi, ecx
xor eax, eax
add edi, edx
movzx edi, byte [0xbba063]
sete al
mov ebx, eax
not ebx
lea eax, [eax + ebx*2]
and al, 7
movzx eax, al
bt edi, eax
jae 0x829204
jmp 0x8292b2
xor eax, eax
add ecx, edx
movzx edx, byte [0xbba063]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2]
and al, 7
movzx eax, al
bt edx, eax
jb 0x829284
mov ecx, fcn.00815080
mov edx, fcn.00815080
xor eax, eax
xor edx, 2
or ecx, 2
add ecx, edx
sete al
mov ecx, eax
not ecx
and ecx, 0x807
lea ecx, [eax + ecx*2 - 0x1266dcc0]
mov al, 1
xor dword [0xbba05c], ecx
and cl, 7
shl al, cl
or byte [0xbba063], al
mov eax, fcn.00815080
mov ecx, fcn.00815080
xor edx, edx
xor ecx, 2
or eax, 2
add eax, ecx
sete dl
mov eax, edx
not eax
lea ecx, [edx + eax*2]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbba063], al
push 1
push 0xbba05c
jmp 0x828c86
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret