Function at 0x778a40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov eax, dword [0xbcbae0]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
xor eax, esp
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0xc], 0
mov dword [esi + 4], 0
mov dword [esi], 0
mov dword [esi + 8], 0xffffffff
xor esi, esi
test edi, edi
jne 0x778b04
lea edx, [esp + 0x28]
call fcn.00792e10
mov esi, eax
test eax, eax
jne 0x779168
mov esi, dword [esp + 0x28]
mov edi, esi
mov ecx, edi
call fcn.00794d00
test eax, eax
jne 0x778b22
push esi
call fcn.00775660
add esp, 4
mov esi, 0xc0a
jmp 0x779168
mov ecx, eax
mov ebx, eax
call fcn.00794e60
test eax, eax
jne 0x77917d
mov eax, 0x7b73c0
mov dword [esp], ebx
xor ebx, ebx
mov dword [esp + 0xc], edi
imul eax, eax
and eax, 3
mov dword [esp + 0x14], eax
xor eax, eax
cmp dword [esp + 0x14], 3
mov edi, dword [ebx*4 + 0xb4d370]
mov esi, dword [ebx*4 + 0xb4d4b0]
mov dword [esp + 0x1c], ebx
sete al
mov ecx, eax
not ecx
and ecx, 3
lea edx, [eax + ecx*2 + 0x4208e7c]
mov eax, 1
xor edx, dword [ebx*4 + 0xb493e0]
mov ecx, edx
and cl, 7
movzx ebx, cl
shl eax, cl
xor cl, 7
mov dword [esp + 4], ebx
mov ebx, 1
shl ebx, cl
movzx ecx, byte [edi + esi - 1]
mov ebp, dword [esp + 4]
bt ecx, ebp
jb 0x778c31
mov dword [esp + 8], eax
mov al, byte [edi + esi - 1]
mov ecx, eax
or cl, bl
lock cmpxchg byte [edi + esi - 1], cl
jne 0x778bb3
mov ecx, dword [esp + 8]
movzx eax, al
test ebx, eax
je 0x778bd5
movzx eax, byte [edi + esi - 1]
test ecx, eax
je 0x778bca
jmp 0x778c31
mov dword [esp + 0x10], ebx
movzx eax, byte [edi + esi - 1]
test ecx, eax
jne 0x778c27
lea ecx, [esi - 4]
shr ecx, 2
je 0x778c1f
xor eax, eax
mov ebx, edi
mov dword [esp + 0x18], ecx
mov ebp, dword [ebx]
mov ecx, eax
mov dword [esp + 4], edx
inc eax
shl dword [esp + 4], cl
and cl, 0x1f
xor cl, 0x1f
xor ebp, edx
shr edx, cl
mov ecx, dword [esp + 0x18]
or edx, dword [esp + 4]
mov dword [ebx], ebp
not ebp
add ebx, 4
imul edx, ebp
cmp eax, ecx
jne 0x778bf2
mov eax, dword [esp + 8]
or byte [edi + esi - 1], al
mov eax, dword [esp + 0x10]
not al
and byte [edi + esi - 1], al
mov ebx, dword [esp + 0x1c]
inc ebx
cmp ebx, 0x50
jne 0x778b4b
mov ecx, dword [esp + 0x58]
mov esi, 4
mov edi, 1
mov edx, pe_nt_image_headers32
mov ebx, 0x4000102
mov ebp, ecx
mov eax, ecx
or ebp, 0xfffffffc
and eax, 4
shl ebp, 0x1d
and ebp, 0xc0000000
cmp eax, 1
sbb esi, 0
test cl, 0x10
cmove edi, esi
test cl, 8
mov ecx, dword [0xc1f184]
cmove ebx, edx
cmp ecx, 2
je 0x778c94
call fcn.007781a0
test eax, eax
je 0x778d5a
push 0
push ebx
push edi
push 0
push 3
push ebp
push dword [esp + 0x18]
call dword [0xbabb5c]
cmp eax, 0xffffffff
je 0x778d00
mov ecx, dword [esp + 0x2c]
mov edx, 0x369f
mov esi, eax
call fcn.00791ae0
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x4c]
test ecx, ecx
je 0x778cd4
mov eax, dword [esp + 0x58]
and eax, 2
shr eax, 1
inc eax
mov dword [ecx], eax
mov edi, dword [ebx + 0x14]
push dword [esp]
call fcn.00775660
add esp, 4
push dword [esp + 0x28]
call fcn.00775660
add esp, 4
test edi, edi
jne 0x778fd9
mov eax, 0xb43d90
jmp 0x778fdb
mov eax, dword [esp + 0x58]
test al, 2
je 0x778d43
mov dword [esp + 0x24], 0
call fcn.00791930
lea eax, [esp + 0x24]
push eax
push 2
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.007794f0
add esp, 0x10
mov esi, eax
call fcn.00791940
test esi, esi
jne 0x778d43
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x778dc6
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x30]
call fcn.00791950
test eax, eax
jne 0x778c94
jmp 0x778dc6
push 0
push ebx
push edi
push 0
push 3
push ebp
push dword [esp + 0x18]
call dword [0xbabb50]
cmp eax, 0xffffffff
jne 0x778cac
mov eax, dword [esp + 0x58]
test al, 2
je 0x778db5
mov dword [esp + 0x20], 0
call fcn.00791930
lea eax, [esp + 0x20]
push eax
push 2
push dword [esp + 0x58]
push dword [esp + 0x58]
call fcn.007794f0
add esp, 0x10
mov esi, eax
call fcn.00791940
test esi, esi
jne 0x778db5
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x778dc6
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x30]
call fcn.00791950
test eax, eax
jne 0x778d5a
mov ecx, dword [esp + 0x2c]
mov edx, 0x369f
call fcn.00791ae0
push dword [esp]
call fcn.00775660
add esp, 4
push dword [esp + 0x28]
call fcn.00775660
add esp, 4
mov ecx, dword [esp + 0x58]
mov eax, ecx
and eax, 0x12
cmp eax, 2
jne 0x778e1f
and ecx, 0xfffffff8
or ecx, 1
push dword [esp + 0x5c]
push ecx
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
call fcn.00778a40
add esp, 0x14
mov esi, eax
jmp 0x779168
mov eax, fcn.00829810
mov edx, 3
movzx esi, byte [0xbad1ab]
mov edi, dword [esp + 0x54]
sub edx, eax
xor eax, eax
mov ecx, edx
xor ecx, fcn.00829810
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2]
and al, 3
movzx eax, al
bt esi, eax
jb 0x778fa3
mov al, byte [0xbad1ab]
mov esi, edx
xor ecx, ecx
mov ah, 1
xor esi, fcn.00829810
sete cl
mov ebx, ecx
not ebx
lea ecx, [ecx + ebx*2]
and cl, 3
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbad1ab], ah
jne 0x778e5d
mov edx, fcn.00829810
mov ecx, 3
movzx eax, al
sub ecx, edx
xor edx, edx
mov esi, ecx
xor esi, fcn.00829810
sete dl
mov ebx, edx
not ebx
lea edx, [edx + ebx*2]
and dl, 3
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x778ee2
mov edx, ecx
xor eax, eax
movzx esi, byte [0xbad1ab]
xor edx, fcn.00829810
sete al
mov edx, eax
not edx
lea eax, [eax + edx*2]
and al, 3
movzx eax, al
bt esi, eax
jae 0x778eb8
jmp 0x778fa3
xor eax, eax
xor ecx, fcn.00829810
movzx edx, byte [0xbad1ab]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2]
and al, 3
movzx eax, al
bt edx, eax
jb 0x778f75
mov eax, fcn.00829810
mov ecx, 3
mov esi, dword [0xbad19c]
sub ecx, eax
xor eax, eax
xor ecx, fcn.00829810
sete al
mov ecx, eax
not ecx
and ecx, 0x865
lea ecx, [eax + ecx*2 + 0x53cd0090]
xor esi, ecx
mov edx, ecx
mov dword [0xbad19c], esi
shr edx, 0x1f
not esi
mov ebx, dword [0xbad1a0]
or edx, ecx
and cl, 7
imul edx, esi
lea esi, [edx + edx]
xor ebx, edx
shr edx, 0x1e
mov dword [0xbad1a0], ebx
or esi, edx
not ebx
mov dl, 1
imul ebx, esi
shl dl, cl
xor dword [0xbad1a4], ebx
or byte [0xbad1ab], dl
mov eax, fcn.00829810
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, fcn.00829810
sete al
mov ecx, eax
not ecx
lea ecx, [eax + ecx*2]
mov al, 0xfe
and cl, 3
xor cl, 7
rol al, cl
and byte [0xbad1ab], al
mov edx, dword [esp + 0x30]
mov esi, 0xe
mov ecx, 0xe
mov dword [edi + 0x14], edx
push 0x36ae
push dword [esp + 0x10]
push 0xbad19c
call fcn.007911b0
add esp, 0xc
mov ecx, 0x36af
call fcn.00795040
jmp 0x779168
mov eax, dword [edi]
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
test cl, 1
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], esi
je 0x778ff4
or byte [edi + 0x10], 2
mov edx, fcn.00827d60
mov esi, fcn.00827d60
movzx ecx, byte [0xbad1b7]
or edx, 2
xor esi, 2
mov eax, edx
add eax, esi
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x779110
mov al, byte [0xbad1b7]
mov ecx, edx
mov ah, 1
add ecx, esi
sete cl
or cl, 6
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbad1b7], ah
jne 0x779025
mov ecx, fcn.00827d60
mov edx, fcn.00827d60
or ecx, 2
xor edx, 2
mov esi, ecx
add esi, edx
sete ah
or ah, 6
xor ah, 7
movzx esi, ah
movzx eax, al
bt eax, esi
jae 0x779087
mov eax, ecx
movzx esi, byte [0xbad1b7]
add eax, edx
sete al
or al, 6
movzx eax, al
bt esi, eax
jae 0x77906a
jmp 0x779110
add ecx, edx
movzx ecx, byte [0xbad1b7]
sete al
or al, 6
movzx eax, al
bt ecx, eax
jb 0x7790eb
mov eax, fcn.00827d60
mov edx, fcn.00827d60
xor ecx, ecx
xor edx, 2
or eax, 2
add eax, edx
mov eax, dword [0xbad1ac]
sete cl
or ecx, 0x61bb1c8e
add ecx, 0x6a0
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbad1ac], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
xor dword [0xbad1b0], edx
mov dl, 1
shl dl, cl
or byte [0xbad1b7], dl
mov eax, fcn.00827d60
mov ecx, fcn.00827d60
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 [0xbad1b7], al
push 1
push 0xbad1ac
push dword [esp + 0x58]
call fcn.0078cdf0
add esp, 0xc
test eax, eax
je 0x77912b
or byte [edi + 0x10], 0x10
mov eax, dword [esp + 0x50]
mov dword [edi + 0x14], 0
xor esi, esi
mov dword [edi + 0x1c], eax
mov dword [edi + 0x30], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x34], 0
mov dword [edi + 0x2c], 0
mov eax, dword [0xbaba38]
mov ecx, dword [0xbaba3c]
mov dword [edi + 0x3c], ecx
mov dword [edi + 0x38], eax
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
push ebx
call fcn.00775660
add esp, 4
push esi
call fcn.00775660
add esp, 4
mov esi, 0x20e
jmp 0x779168