Function at 0x429290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x4ca510]
xor eax, esp
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], ebx
cmp esi, ebx
jne 0x4292d0
lea eax, [ebx + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.0046c8b9
mov esp, ebp
pop ebp
ret
call fcn.0042b040
mov dword [esp + 0xc], eax
cmp eax, ebx
je 0x429634
cmp dword [0x4db37c], ebx
jne 0x4292fd
call fcn.004290e0
mov dword [0x4db384], eax
mov dword [0x4db37c], 1
cmp dword [0x4db384], ebx
je 0x429634
cmp dword [0x4db380], ebx
je 0x429345
mov ecx, dword [0x4db378]
cmp dword [ecx], 1
jne 0x42933b
xor edx, edx
cmp dword [0x4dad58], ebx
sete dl
mov edi, edx
mov dword [esp + 0x10], edi
cmp edi, ebx
jne 0x42934d
mov eax, dword [0x4db374]
cmp dword [eax], 1
je 0x42934d
mov eax, str.assertion_failed:__unsigned_int__lock__1
call fcn.00423470
mov dword [esp + 0x10], ebx
mov edi, ebx
jmp 0x429331
mov edx, dword [0x4db360]
mov eax, dword [0x4db364]
mov ecx, dword [0x4db35c]
mov dword [esp + 0x28], edx
mov edx, dword [0x4dad5c]
mov dword [esp + 0x2c], eax
mov eax, dword [0x4dad60]
mov dword [esp + 0x30], edx
mov edx, dword [0x4dad64]
mov ebx, ecx
add ecx, esi
mov dword [esp + 0x34], eax
mov eax, dword [0x4dad68]
mov dword [esp + 0x38], edx
mov edx, dword [0x4dad6c]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov dword [0x4db35c], ecx
cmp ecx, 0x3ff
jb 0x4293d4
mov eax, 0x401005
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 9
imul eax, eax, 0xfffffc01
add ecx, eax
mov dword [0x4db35c], ecx
mov dword [0x4db358], 0x3ff
jmp 0x4293ea
mov eax, dword [0x4db358]
cmp eax, 0x3ff
jae 0x4293ea
cmp ecx, eax
jbe 0x4293ea
mov dword [0x4db358], ecx
mov eax, 0x66666667
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
add ecx, ecx
add ecx, ecx
mov edx, esi
sub edx, ecx
xor ecx, ecx
test edx, edx
setg cl
add ecx, eax
add dword [0x4db364], ecx
test edi, edi
jne 0x42942e
mov edx, dword [0x4db374]
cmp dword [edx], 1
je 0x42942e
mov eax, str.assertion_failed:__unsigned_int__lock__1
call fcn.00423470
mov dword [esp + 0x20], 0
test esi, esi
jle 0x429587
mov dword [esp + 0x14], esi
jmp 0x429448
mov esi, dword [esp + 0x14]
mov dword [esp + 0x1c], esi
cmp esi, 0x14
jle 0x42945d
mov dword [esp + 0x1c], 0x14
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
push eax
mov eax, 0x488b74
call fcn.0042b120
add esp, 4
test eax, eax
je 0x429634
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 0x14]
push 0x14
lea ecx, [esp + 0x34]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
je 0x429634
lea edi, [esi + ebx - 0x3ff]
lea ecx, [ebx + 0x4dad70]
test edi, edi
jle 0x4294d1
mov eax, esi
sub eax, edi
push eax
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x14]
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
je 0x429634
mov eax, dword [esp + 0xc]
push edi
push 0x4dad70
push eax
mov eax, dword [eax + 0x14]
call eax
jmp 0x4294dd
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 0x14]
push esi
push ecx
push eax
call edx
add esp, 0xc
test eax, eax
je 0x429634
mov eax, dword [esp + 0x18]
push esi
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x14]
push eax
call ecx
add esp, 0xc
test eax, eax
je 0x429634
mov eax, dword [esp + 0xc]
push 8
lea edx, [esp + 0x2c]
push edx
push eax
mov eax, dword [eax + 0x14]
call eax
add esp, 0xc
test eax, eax
je 0x429634
mov esi, dword [esp + 0xc]
xor edi, edi
lea ecx, [esp + 0x30]
call fcn.0042b250
test eax, eax
je 0x429634
mov esi, dword [esp + 0x1c]
inc dword [esp + 0x2c]
add dword [esp + 0x18], esi
xor eax, eax
test esi, esi
jle 0x42956a
jmp 0x429550
mov cl, byte [esp + eax + 0x30]
xor byte [ebx + 0x4dad70], cl
inc ebx
cmp ebx, 0x3ff
jl 0x429565
xor ebx, ebx
inc eax
cmp eax, esi
jl 0x429550
mov eax, dword [esp + 0x20]
sub dword [esp + 0x14], 0x14
add eax, 0x14
mov dword [esp + 0x20], eax
cmp eax, dword [ebp + 0xc]
jl 0x429444
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x4295a0
mov edx, dword [0x4db374]
cmp dword [edx], 1
je 0x4295a0
mov eax, str.assertion_failed:__unsigned_int__lock__1
call fcn.00423470
xor eax, eax
jmp 0x4295b0
movzx ecx, byte [esp + eax + 0x30]
xor byte [eax + 0x4dad5c], cl
movzx edx, byte [esp + eax + 0x31]
movzx ecx, byte [esp + eax + 0x32]
xor byte [eax + 0x4dad5d], dl
xor byte [eax + 0x4dad5e], cl
movzx edx, byte [esp + eax + 0x33]
movzx ecx, byte [esp + eax + 0x34]
xor byte [eax + 0x4dad5f], dl
xor byte [eax + 0x4dad60], cl
add eax, 5
cmp eax, 0x14
jl 0x4295b0
fld qword [0x4c86b8]
fld qword [0x4db368]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x429611
fadd qword [ebp + 0x10]
fstp qword [0x4db368]
jmp 0x429613
fstp st(0)
test edi, edi
jne 0x42962c
mov edx, dword [0x4db374]
cmp dword [edx], 1
je 0x42962c
mov eax, str.assertion_failed:__unsigned_int__lock__1
call fcn.00423470
mov dword [esp + 0x24], 1
mov edi, dword [esp + 0xc]
call fcn.0042b0a0
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0046c8b9
mov esp, ebp
pop ebp
ret