Function at 0x3117090
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x298
mov ebx, dword [0x312cfd4]
mov ebp, dword [0x312cfd0]
mov eax, ebp
or eax, ebx
jne 0x311715e
mov dword [esp + 0x50], 0x139e11a6
mov dword [esp + 0x54], 0xef5aed50
mov dword [esp + 0x58], 0xeb1ce95c
mov dword [esp + 0x5c], 0xe752e558
mov dword [esp + 0x60], 0xe3e2e154
mov word [esp + 0x64], 0
mov byte [esp + 0x66], 0
mov dword [esp + 0x158], 0
mov eax, dword [esp + 0x158]
cmp eax, 0x16
ja 0x311713a
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x158]
movzx eax, byte [esp + eax + 0x50]
push dword [esp + 0x158]
push eax
call fcn.03117ac0
add esp, 8
mov ecx, dword [esp + 0x158]
mov byte [esp + ecx + 0x50], al
inc dword [esp + 0x158]
mov eax, dword [esp + 0x158]
cmp eax, 0x17
jb 0x3117100
lea eax, [esp + 0x50]
push eax
call fcn.03116cf0
add esp, 4
mov ebp, eax
mov dword [0x312cfd4], edx
mov dword [0x312cfd0], eax
or eax, edx
je 0x311724d
mov ebx, edx
lea eax, [esp + 0x258]
push 0x40
push eax
push ebx
push ebp
call fcn.03116b00
add esp, 0x10
test eax, eax
js 0x311724d
mov eax, dword [esp + 0x294]
mov ecx, eax
sar ecx, 0x1f
add eax, ebp
adc ecx, ebx
lea edx, [esp + 0x50]
push 0x108
push edx
push ecx
push eax
call fcn.03116b00
add esp, 0x10
xor edi, edi
test eax, eax
js 0x311724f
cmp dword [esp + 0xdc], 0
je 0x311724f
mov eax, dword [esp + 0xd8]
mov esi, 0
test eax, eax
je 0x3117251
add eax, ebp
mov ecx, ebx
adc ecx, 0
lea edx, [esp + 0x28]
push 0x28
push edx
push ecx
push eax
call fcn.03116b00
add esp, 0x10
test eax, eax
js 0x311724d
mov esi, dword [esp + 0x3c]
mov eax, 0xffffffff
cmp esi, 0x40000000
jae 0x31171fe
lea eax, [esi*4]
push eax
call fcn.030dc610
add esp, 4
mov edx, esi
and edx, 0xfffffffb
mov ecx, esi
and ecx, 4
or esi, 4
imul esi, ecx
xor ecx, 4
imul ecx, edx
add esi, ecx
mov edx, dword [esp + 0x44]
add edx, ebp
mov ecx, ebx
adc ecx, 0
push esi
mov dword [esp + 0x10], eax
push eax
push ecx
push edx
call fcn.03116b00
add esp, 0x10
test eax, eax
js 0x3117260
mov eax, dword [esp + 0x3c]
test eax, eax
jns 0x3117269
mov eax, 0xffffffff
jmp 0x311726b
xor edi, edi
xor esi, esi
mov eax, edi
mov edx, esi
add esp, 0x298
pop esi
pop edi
pop ebx
pop ebp
ret
xor edi, edi
xor esi, esi
jmp 0x3117467
add eax, eax
push eax
call fcn.030dc610
add esp, 4
mov esi, dword [esp + 0x40]
add esi, esi
mov ecx, dword [esp + 0x4c]
add ecx, ebp
mov edx, ebx
adc edx, 0
push esi
mov dword [esp + 0xc], eax
push eax
push edx
push ecx
call fcn.03116b00
add esp, 0x10
test eax, eax
js 0x3117457
mov ecx, dword [esp + 0x40]
lea esi, [ecx*4]
mov eax, 0xffffffff
cmp ecx, 0x40000000
jae 0x31172b7
mov eax, esi
push eax
call fcn.030dc610
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x48]
add eax, ebp
mov ecx, ebx
adc ecx, 0
push esi
push edi
push ecx
push eax
call fcn.03116b00
add esp, 0x10
test eax, eax
mov dword [esp + 4], edi
js 0x3117445
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
cmp esi, eax
jb 0x31172f3
mov esi, eax
test esi, esi
je 0x3117445
xor eax, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], esi
jmp 0x3117336
mov esi, 0xb14a5e2
cmp esi, dword [esp + 0x2ac]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
je 0x3117478
mov eax, dword [esp + 0x10]
inc eax
cmp eax, esi
je 0x3117445
mov dword [esp + 0x10], eax
mov eax, dword [edi + eax*4]
add eax, ebp
mov ecx, ebx
adc ecx, 0
push 0x100
lea edx, [esp + 0x15c]
push edx
push ecx
push eax
call fcn.03116b00
add esp, 0x10
cmp eax, 0xbfffffff
ja 0x3117329
mov ebx, 0xffffffff
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
cmp byte [esp + ebx + 0x159], 0
lea ebx, [ebx + 1]
lea eax, [eax + 1]
jne 0x3117370
mov dword [esp + 0x14], 0x62626013
mov byte [esp + 0x18], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 4
ja 0x31173c6
nop
nop
mov eax, dword [esp]
movzx eax, byte [esp + eax + 0x14]
push dword [esp]
push eax
call fcn.03117b40
add esp, 8
mov ecx, dword [esp]
mov byte [esp + ecx + 0x14], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 5
jb 0x31173a0
test ebx, ebx
je 0x311730b
mov eax, dword [esp + 0x14]
mov edx, 0xb14a5e2
lea ecx, [esp + 0x158]
cmp ebx, 4
jb 0x311741f
mov esi, ebp
and esi, 0xfffffffc
nop
nop
nop
nop
nop
nop
nop
nop
movsx edi, byte [ecx]
xor edi, edx
imul edi, eax
movsx edx, byte [ecx + 1]
xor edx, edi
imul edx, eax
movsx edi, byte [ecx + 2]
xor edi, edx
imul edi, eax
movsx edx, byte [ecx + 3]
add ecx, 4
xor edx, edi
imul edx, eax
add esi, 0xfffffffc
jne 0x31173f0
mov edi, dword [esp + 4]
mov esi, edx
test bl, 3
je 0x3117310
and ebp, 3
xor ebx, ebx
nop
movsx esi, byte [ecx + ebx]
xor esi, edx
imul esi, eax
inc ebx
mov edx, esi
cmp ebp, ebx
jne 0x3117430
jmp 0x3117310
xor edi, edi
xor esi, esi
push dword [esp + 4]
call fcn.030dc620
add esp, 4
jmp 0x311745b
xor edi, edi
xor esi, esi
push dword [esp + 8]
call fcn.030dc620
add esp, 4
push dword [esp + 0xc]
call fcn.030dc620
add esp, 4
jmp 0x3117251
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
movzx eax, word [eax + ecx*2]
mov ecx, dword [esp + 0xc]
add ebp, dword [ecx + eax*4]
adc ebx, 0
mov edi, ebp
mov esi, ebx
jmp 0x3117449