Function at 0x403f6c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff44
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x10]
mov eax, 0x482360
call fcn.00461510
xor edx, edx
mov dword [ebp - 0x64], edx
mov ecx, dword [ebp + 0x1c]
shl ecx, 4
add ecx, 0x1f
test ecx, ecx
jns 0x403f9d
add ecx, 0x1f
sar ecx, 5
shl ecx, 2
mov dword [ebp - 0x70], ecx
mov eax, dword [ebp - 0x70]
imul dword [ebp + 0x20]
add eax, 0x1400
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x70]
sar edx, 1
jns 0x403fbe
adc edx, 0
mov dword [ebp - 0x70], edx
mov ecx, dword [ebp - 0x70]
add ecx, ecx
push ecx
call fcn.004609b8
pop ecx
mov dword [ebp - 0x60], eax
mov dl, 1
mov eax, dword [0x44ce94]
call fcn.00404c28
mov dword [ebp - 0x74], eax
mov dl, 1
mov eax, dword [0x44ce94]
call fcn.00404c28
mov dword [ebp - 0x78], eax
cmp ebx, 1
jne 0x40413c
mov ecx, dword [ebp + 0x14]
mov edx, esi
mov eax, dword [ebp - 0x74]
call fcn.0044fd6c
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x310], 0
jle 0x4043c6
cmp dword [ebp + 0x14], 0x2800
jle 0x4043c6
mov edx, 4
mov eax, dword [ebp - 0x74]
call fcn.0044fcb8
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0xa8]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x40404b
adc edx, 0
mov eax, dword [ebp - 0x74]
call fcn.0044fcb8
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0xbc]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x310], 1
jne 0x4040cf
push 0x15
push 0
lea edx, [ebp - 0x94]
push edx
call fcn.004611bc
mov ecx, dword [ebp + 8]
add esp, 0xc
lea edx, [ebp - 0x94]
mov eax, dword [ecx + 0x314]
push eax
push 0x481568
push edx
call fcn.00463d34
add esp, 0xc
xor esi, esi
lea edx, [ebp - 0xa8]
lea eax, [ebp - 0xbc]
mov ecx, 0x14
sub ecx, esi
inc esi
mov cl, byte [ebp + ecx - 0x94]
xor cl, byte [eax]
xor cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
cmp esi, 0x14
jl 0x4040b1
jmp 0x404108
mov eax, dword [ebp + 8]
cmp dword [eax + 0x310], 2
jne 0x404108
xor esi, esi
lea eax, [ebp - 0xa8]
lea edx, [ebp - 0xbc]
mov ecx, 0x14
mov ebx, dword [ebp + 8]
sub ecx, esi
inc esi
mov cl, byte [ebx + ecx + 0x318]
xor cl, byte [edx]
xor cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp esi, 0x14
jl 0x4040e9
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x404112
adc edx, 0
mov eax, dword [ebp - 0x74]
call fcn.0044fcb8
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0xbc]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0x74]
call fcn.0044fcb8
jmp 0x4043c6
cmp ebx, 2
je 0x40414a
cmp ebx, 3
jne 0x4043c6
mov dl, 1
mov eax, dword [0x44ce94]
call fcn.00404c28
mov ebx, eax
mov eax, esi
lea edx, [ebp - 0x68]
mov ecx, 4
mov edi, dword [eax]
call dword [edi + 4]
mov ecx, dword [ebp + 0x14]
sub ecx, 4
mov edx, esi
mov eax, ebx
call fcn.0044fd6c
mov eax, dword [ebp + 8]
cmp dword [eax + 0x310], 0
jle 0x4042a5
cmp dword [ebp + 0x14], 0x2800
jle 0x4042a5
xor edx, edx
mov eax, ebx
call fcn.0044fcb8
mov eax, ebx
lea edx, [ebp - 0xa8]
mov ecx, 0x14
mov esi, dword [eax]
call dword [esi + 4]
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x4041b8
adc edx, 0
sub edx, 4
mov eax, ebx
call fcn.0044fcb8
mov eax, ebx
lea edx, [ebp - 0xbc]
mov ecx, 0x14
mov esi, dword [eax]
call dword [esi + 4]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x310], 1
jne 0x40423d
push 0x15
push 0
lea edx, [ebp - 0x94]
push edx
call fcn.004611bc
mov ecx, dword [ebp + 8]
add esp, 0xc
lea edx, [ebp - 0x94]
mov eax, dword [ecx + 0x314]
push eax
push 0x48156b
push edx
call fcn.00463d34
add esp, 0xc
xor esi, esi
lea edx, [ebp - 0xa8]
lea eax, [ebp - 0xbc]
mov ecx, 0x14
sub ecx, esi
inc esi
mov cl, byte [ebp + ecx - 0x94]
xor cl, byte [eax]
xor cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
cmp esi, 0x14
jl 0x40421f
jmp 0x404276
mov eax, dword [ebp + 8]
cmp dword [eax + 0x310], 2
jne 0x404276
xor esi, esi
lea eax, [ebp - 0xa8]
lea edx, [ebp - 0xbc]
mov ecx, 0x14
mov edi, dword [ebp + 8]
sub ecx, esi
inc esi
mov cl, byte [edi + ecx + 0x318]
xor cl, byte [edx]
xor cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp esi, 0x14
jl 0x404257
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x404280
adc edx, 0
sub edx, 4
mov eax, ebx
call fcn.0044fcb8
mov eax, ebx
lea edx, [ebp - 0xbc]
mov ecx, 0x14
mov esi, dword [eax]
call dword [esi + 8]
xor edx, edx
mov eax, ebx
call fcn.0044fcb8
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x68]
inc edx
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [ebp - 0x74]
call fcn.0044fcc4
mov dword [ebp - 0x7c], eax
mov eax, ebx
call fcn.0044fcc4
push eax
lea ecx, [ebp - 0x7c]
mov edx, dword [ebx + 4]
push edx
push ecx
mov eax, dword [ebp - 0x74]
mov edx, dword [eax + 4]
push edx
call fcn.0040e510
add esp, 0x10
test eax, eax
je 0x40439f
mov esi, ebx
mov dword [ebp - 8], esi
test esi, esi
je 0x404309
mov eax, dword [esi]
mov dword [ebp - 4], eax
mov word [ebp - 0x4c], 0x14
mov edx, 3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 8
mov ebx, dword [ebp - 0x74]
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x404331
mov eax, dword [ebx]
mov dword [ebp - 0xc], eax
mov word [ebp - 0x4c], 0x2c
mov edx, 3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x20
mov ebx, dword [ebp - 0x78]
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x404359
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
mov word [ebp - 0x4c], 0x44
mov edx, 3
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x38
mov edx, dword [ebp - 0x60]
push edx
call fcn.004607f0
pop ecx
mov edx, 0x48156e
mov word [ebp - 0x4c], 0x50
lea eax, [ebp - 0x1c]
call fcn.0046c544
inc dword [ebp - 0x40]
mov eax, dword [eax]
call fcn.004334f4
dec dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.0046c5fc
mov ecx, dword [ebp - 0x5c]
mov dword fs:[0], ecx
jmp 0x40456e
mov esi, ebx
mov dword [ebp - 0x24], esi
test esi, esi
je 0x4043c6
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov word [ebp - 0x4c], 0x68
mov edx, 3
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x5c
xor edx, edx
mov eax, dword [ebp - 0x74]
call fcn.0044fcb8
mov edx, dword [ebp - 0x74]
mov ebx, dword [edx + 4]
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x64]
mov cx, word [ebx]
mov word [eax + edx*2], cx
inc dword [ebp - 0x64]
mov eax, dword [ebp - 0x74]
call fcn.0044fcc4
mov ecx, eax
sar ecx, 1
jns 0x4043f7
adc ecx, 0
lea edx, [ecx - 3]
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x68], 1
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x6c]
jge 0x40447c
mov edx, dword [ebp - 0x68]
cmp word [ebx + edx*2], 0
jne 0x40445d
mov eax, dword [ebp - 0x68]
cmp word [ebx + eax*2 + 2], 0
jne 0x40445d
mov edx, dword [ebp - 0x68]
cmp word [ebx + edx*2 + 4], 0
je 0x40445d
xor edx, edx
mov eax, dword [ebp - 0x60]
mov esi, dword [ebp - 0x64]
lea eax, [eax + esi*2]
jmp 0x40444b
mov esi, dword [ebp - 0x68]
mov si, word [ebx + esi*2 + 6]
mov word [eax], si
add eax, 2
inc dword [ebp - 0x64]
inc edx
mov esi, dword [ebp - 0x68]
movzx esi, word [ebx + esi*2 + 4]
cmp edx, esi
jl 0x404439
add dword [ebp - 0x68], 3
jmp 0x404471
mov esi, dword [ebp - 0x68]
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x64]
mov si, word [ebx + esi*2]
mov word [eax + edx*2], si
inc dword [ebp - 0x64]
inc dword [ebp - 0x68]
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x6c]
jl 0x40440c
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
lea eax, [edx + eax*2]
cmp ecx, dword [ebp - 0x68]
jle 0x4044a2
mov edx, dword [ebp - 0x68]
mov dx, word [ebx + edx*2]
mov word [eax], dx
inc dword [ebp - 0x64]
add eax, 2
inc dword [ebp - 0x68]
cmp ecx, dword [ebp - 0x68]
jg 0x40448a
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x70]
jle 0x4044e6
mov word [ebp - 0x4c], 0x74
mov edx, 0x481581
lea eax, [ebp - 0x28]
call fcn.0046c544
inc dword [ebp - 0x40]
mov eax, dword [eax]
call fcn.004334f4
dec dword [ebp - 0x40]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.0046c5fc
mov ecx, dword [ebp - 0x5c]
mov dword fs:[0], ecx
jmp 0x40456e
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x64]
add ecx, ecx
mov edx, dword [ebp - 0x60]
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0x78]
call fcn.0044fcb8
mov edx, dword [ebp - 0x78]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov ebx, dword [ebp - 0x74]
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x404533
mov eax, dword [ebx]
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x4c], 0x8c
mov edx, 3
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x80
mov ebx, dword [ebp - 0x78]
mov dword [ebp - 0x38], ebx
test ebx, ebx
je 0x40455b
mov eax, dword [ebx]
mov dword [ebp - 0x34], eax
mov word [ebp - 0x4c], 0xa4
mov edx, 3
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x98
mov edx, dword [ebp - 0x60]
push edx
call fcn.004607f0
pop ecx
mov eax, dword [ebp - 0x5c]
mov dword fs:[0], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret