Function at 0x1087210
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [ebp + 0x10]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 4], 0x20
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], 1
mov dword [esi + 0x54], eax
je 0x10872ad
movzx eax, word [edi + 0x5c]
cmp eax, 9
ja case.0x1087257.0
jmp dword [eax*4 + 0x1087e8c]
mov dword [esi + 4], 0x26
jmp 0x10872b4
mov dword [esi + 4], 0x21
mov dword [ebp - 0xc], 3
jmp 0x10872b4
mov dword [esi + 4], 0x22
jmp 0x10872b4
mov dword [esi + 4], 0x23
jmp 0x10872b4
mov dword [esi + 4], 0x25
jmp 0x10872b4
mov dword [esi + 4], 0x1c
jmp 0x10872b4
mov dword [esi + 4], 0x2b
jmp 0x10872b4
mov dword [esi + 4], 0x2c
jmp 0x10872b4
mov dword [ebp - 0xc], 2
mov ecx, dword [esi + 0x14]
mov eax, dword [edi + 0x2c]
lea edx, [ecx - 0x40]
mov dword [esi + 0x44], eax
cmp eax, edx
jbe 0x10872d0
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
mov dword [esi + 0x44], edx
mov eax, dword [edi + 0x28]
mov dword [ebp + 0xc], eax
cmp eax, ebx
jne 0x10872fa
cmp dword [ebp - 0xc], 2
je 0x10872f4
mov eax, dword [esi + 0x10]
lea edx, [esi + 8]
push edx
push ecx
mov ecx, dword [esi + 0x5c]
mov edx, dword [ecx]
push eax
push edx
call fcn.01031180
mov eax, dword [edi + 0x2c]
mov dword [ebp + 0xc], eax
mov ecx, dword [esi + 0x10]
cmp dword [ecx + 0x20], 0x5a584653
je 0x108788a
movzx ecx, word [edi + 6]
mov eax, dword [esi + 0x40]
mov edx, dword [edi + 0x34]
mov ebx, dword [esi + 0x14]
xor eax, ebx
xor eax, ecx
xor eax, edx
mov dword [esi + 0x40], eax
mov dword [esi + 0x24], edx
mov edx, dword [edi + 0x2c]
xor edx, eax
mov dword [esi + 0x40], edx
mov eax, dword [edi + 0x30]
xor eax, edx
lea edx, [ecx + ecx*4]
mov dword [esi + 0x40], eax
lea eax, [edx*8 + 0xf8]
mov dword [ebp - 0x2c], ecx
cmp eax, ebx
ja 0x10876b3
add edi, 0xf8
mov dword [ebp - 8], 0
mov dword [ebp - 0x24], edi
test ecx, ecx
jbe 0x1087630
mov eax, dword [ebp - 0x2c]
dec eax
cmp dword [ebp - 8], eax
jne 0x108737f
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov dword [ebp - 0x34], ecx
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x14], ecx
cmp ecx, eax
jbe 0x108737f
mov dword [ebp - 0x14], eax
or eax, 0xffffffff
cmp dword [edi + 0x14], eax
je 0x1087dc0
cmp dword [edi + 0x24], eax
je 0x1087dc0
mov eax, dword [esi + 0x14]
cmp dword [edi + 0x10], eax
ja 0x10876b3
push 4
push 0x10108bc
push edi
call dword [sym.imp.msvcrt.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x108788a
push 8
push edi
call fcn.01031570
movzx edx, ax
xor dword [esi + 0x40], edx
mov ecx, dword [esi + 0x40]
mov eax, dword [edi + 0x24]
xor eax, ecx
mov dword [esi + 0x40], eax
mov ecx, dword [edi + 0x14]
xor ecx, eax
mov dword [esi + 0x40], ecx
mov eax, dword [edi + 0x10]
xor eax, ecx
mov dword [esi + 0x40], eax
mov ebx, dword [edi + 8]
xor ebx, eax
mov dword [esi + 0x40], ebx
mov eax, dword [edi + 0x10]
test eax, eax
jl 0x108743a
mov ecx, dword [edi + 0x14]
test ecx, ecx
jl 0x108743a
lea edx, [eax + ecx]
cmp edx, dword [esi + 0x14]
ja 0x108743a
test edx, edx
jbe 0x108743a
push eax
mov eax, dword [esi + 0x10]
add eax, ecx
push eax
call fcn.01037550
fnstcw word [ebp + 0xa]
movzx eax, word [ebp + 0xa]
mov edx, dword [ebp - 8]
or eax, 0xc00
mov dword [ebp + 0x10], eax
inc edx
fldcw word [ebp + 0x10]
fistp qword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
fldcw word [ebp + 0xa]
imul ecx, edx
shl ecx, 0xd
xor ecx, ebx
mov dword [esi + 0x40], ecx
test dword [edi + 0x24], 0x20000000
je 0x108744c
cmp dword [esi + 0x30], 0
jne 0x108744c
mov dword [esi + 0x30], edi
cmp dword [ebp - 4], 0
jne 0x1087594
mov eax, dword [edi + 0x14]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], eax
jae 0x1087594
mov eax, dword [esi + 0x14]
sub eax, 0x20
cmp dword [ebp + 0xc], eax
jae 0x1087594
mov edx, dword [esi + 0x5c]
mov ecx, dword [esi + 0x10]
add ecx, dword [ebp + 0xc]
mov eax, dword [edx]
mov bl, byte [ecx]
xor edx, edx
mov dword [ebp + 0x10], edx
cmp bl, byte [edx + ecx]
jne 0x10874da
inc edx
cmp edx, 8
jl 0x1087486
lea edx, [ecx + 1]
mov dword [ebp - 0x18], 8
jmp 0x10874a2
mov bl, byte [ecx]
cmp bl, byte [edx - 1]
je 0x10874ac
inc dword [ebp + 0x10]
mov bl, byte [ecx]
cmp bl, byte [edx]
je 0x10874b5
inc dword [ebp + 0x10]
mov bl, byte [ecx]
cmp bl, byte [edx + 1]
je 0x10874bf
inc dword [ebp + 0x10]
mov bl, byte [ecx]
cmp bl, byte [edx + 2]
je 0x10874c7
inc dword [ebp + 0x10]
add edx, 4
sub dword [ebp - 0x18], 1
jne 0x10874a0
cmp dword [ebp + 0x10], 2
jl 0x1087594
mov dword [ebp + 8], 8
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x40], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x40], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 8], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x10874e1
mov edi, dword [ebp - 0x24]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 4]
add eax, 0xffffffe0
cmp ecx, eax
jae 0x10875c5
mov eax, dword [esi + 0x10]
add eax, ecx
mov edx, 0x54584557
cmp dword [eax], edx
je 0x10876a0
cmp dword [eax + 4], edx
je 0x10876a0
cmp dword [eax + 8], edx
je 0x10876a0
mov ebx, dword [edi + 0x10]
add ecx, ebx
cmp dword [ebp - 0x20], 0
mov dword [ebp - 4], ecx
jne 0x108761a
mov edx, dword [edi + 0xc]
mov eax, dword [ebp + 0xc]
cmp edx, eax
ja 0x108761a
lea ecx, [edx + ebx]
cmp ecx, eax
jbe 0x108761a
mov ecx, dword [edi + 0x14]
mov eax, ecx
sub eax, edx
add eax, dword [ebp + 0xc]
mov edx, dword [esi + 0x14]
add edx, 0xfffffff0
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x10], eax
cmp eax, edx
ja 0x10876b3
mov edx, eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x28], edx
mov eax, dword [edi + 8]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ecx
mov dword [esi + 0x2c], eax
mov eax, dword [ebp - 8]
inc eax
add edi, 0x28
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], edi
cmp eax, dword [ebp - 0x2c]
jb 0x1087360
mov eax, dword [esi + 0x14]
mov ebx, dword [ebp - 4]
cmp ebx, eax
ja 0x1087dc0
add eax, 0xfffffff0
cmp ebx, eax
jae 0x1087dc0
mov edi, dword [esi + 0x10]
add edi, ebx
mov eax, 0x5746
mov dword [esi + 0x3c], ebx
mov dword [ebp + 0x10], edi
cmp word [edi], ax
je 0x1087e64
push 4
lea ecx, [edi + 8]
push 0x10108b4
push ecx
call dword [sym.imp.msvcrt.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x1087e64
mov eax, dword [edi]
cmp eax, 0x3031424e
je 0x1087dc0
mov edx, 0x5a4d
cmp ax, dx
je 0x108789d
cmp eax, 0x4643534d
jne 0x10876d8
pop edi
mov eax, 0x2e
pop esi
add eax, 0x10000000
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 8]
push ecx
mov ecx, dword [esi + 0x5c]
push edx
mov edx, dword [ecx]
push eax
push edx
call fcn.010314f0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0x21726152
je 0x1087701
cmp eax, 0x6d2a2a2a
jne 0x1087714
mov eax, dword [esi + 0x14]
push 4
push 0x10108ac
sub eax, ebx
push eax
push edi
call fcn.01037520
test eax, eax
je 0x108788a
pop edi
mov eax, 0x2f
pop esi
add eax, 0x10000000
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edi, dword [esi + 0x14]
mov eax, edi
sub eax, ebx
cmp eax, 0x2000
jb 0x1087851
cmp eax, 0x100000
ja 0x1087851
mov ebx, dword [ebp + 0x10]
push 4
push 0x10108a4
push pe_nt_image_headers32
push ebx
call fcn.0102a7f0
test eax, eax
jne 0x108775c
push 4
push 0x101089c
push pe_nt_image_headers32
push ebx
call fcn.0102a7f0
sub eax, dword [esi + 0x10]
cmp eax, 0x14
jbe 0x108776c
cmp eax, edi
jb 0x108789d
push 4
xor eax, eax
push ebx
lea ecx, [ebp - 0x2c]
push ecx
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], al
call fcn.0102a6b0
mov al, byte [ebp - 0x2c]
test al, al
je 0x1087851
mov bl, byte [ebp - 0x2b]
test bl, bl
je 0x1087851
mov dl, byte [ebp - 0x2a]
test dl, dl
je 0x1087851
mov cl, byte [ebp - 0x29]
test cl, cl
je 0x1087851
cmp al, bl
je 0x1087851
cmp dl, cl
je 0x1087851
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 0x10]
mov edi, eax
sub eax, ecx
mov ebx, dword [esi + 0x14]
sub ebx, eax
mov eax, 0x80
cmp ebx, 0x80
ja 0x10877da
mov eax, ebx
push 4
push 0x10108a4
push eax
push edi
call fcn.01037520
test eax, eax
jne 0x108789d
cmp ebx, 0x80
jbe 0x10877fd
mov ebx, 0x80
push 4
push 0x101089c
push ebx
push edi
call fcn.01037520
test eax, eax
jne 0x108789d
mov ecx, dword [ebp - 0x30]
mov eax, edi
sub eax, dword [esi + 0x10]
inc ecx
mov dword [ebp - 0x30], ecx
cmp ecx, 0x14
ja 0x1087851
mov ecx, dword [esi + 0x14]
sub ecx, eax
cmp ecx, 0x400
jb 0x1087851
push 4
lea edx, [ebp - 0x2c]
push edx
add ecx, 0xfffffff0
push ecx
add edi, 0x10
push edi
call fcn.01037520
mov edi, eax
sub eax, dword [esi + 0x10]
test edi, edi
jne 0x10877c6
mov edi, dword [esi + 0x14]
sub edi, dword [ebp - 4]
mov dword [ebp - 8], edi
cmp edi, 0x200
jbe 0x1087dc0
mov eax, edi
cmp edi, 0x400
jb 0x1087875
mov eax, 0x400
mov ebx, dword [ebp + 0x10]
push 4
push 0x1010894
push eax
push ebx
call fcn.01037520
test eax, eax
je 0x10878b0
pop edi
mov eax, 0x30
pop esi
add eax, 0x10000000
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
mov eax, 0x33
pop esi
add eax, 0x10000000
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, edi
mov dword [ebp + 8], eax
fild dword [ebp + 8]
test eax, eax
jge 0x10878c2
fadd qword [0x100c0c0]
mov ecx, dword [ebp - 4]
fild dword [ebp - 4]
test ecx, ecx
jge 0x10878d2
fadd qword [0x100c0c0]
fdiv qword [0x10107d0]
fcompp
fnstsw ax
test ah, 5
jnp 0x108790f
cmp edi, 0x8000
jbe 0x1087dc0
push 0x400
lea edx, [ebx + 0x400]
push edx
call fcn.01037550
fcomp qword [0x100f9c8]
fnstsw ax
test ah, 0x41
jne 0x1087dc0
mov eax, 0xaaaaaaab
mul edi
shr edx, 2
push 0x200
add edx, ebx
push edx
call fcn.01037550
fcomp qword [0x100c0b8]
fnstsw ax
test ah, 0x41
jne 0x1087dc0
cmp edi, 0x800
jbe 0x1087949
shr edi, 0xa
dec edi
shl edi, 0xa
mov dword [ebp - 8], edi
mov eax, 0xaaaaaaab
mul edi
mov eax, dword [esi + 0x5c]
mov eax, dword [eax]
shr edx, 2
mov cl, byte [edx + ebx]
add edx, ebx
xor edi, edi
mov dword [ebp + 8], edi
cmp cl, byte [edi + edx]
jne 0x10879a9
inc edi
cmp edi, 0x10
jl 0x1087962
lea edi, [edx + 1]
mov dword [ebp - 0x30], 0x10
cmp cl, byte [edi - 1]
je 0x108797f
inc dword [ebp + 8]
cmp cl, byte [edi]
je 0x1087986
inc dword [ebp + 8]
cmp cl, byte [edi + 1]
je 0x108798e
inc dword [ebp + 8]
cmp cl, byte [edi + 2]
je 0x1087996
inc dword [ebp + 8]
add edi, 4
sub dword [ebp - 0x30], 1
jne 0x1087977
cmp dword [ebp + 8], 4
jl 0x1087a60
mov dword [ebp + 8], 0x10
mov ecx, dword [esi + 0xc]
movzx ebx, byte [edx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x40], ecx
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
mov dword [esi + 0xc], ebx
mov ecx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [edx + 1]
mov dword [ebp - 0x40], ecx
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
mov ecx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], ecx
mov dword [esi + 8], edi
movzx ebx, byte [edx + 2]
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
mov ecx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], ecx
mov dword [esi + 8], edi
movzx ebx, byte [edx + 3]
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
add edx, 4
sub dword [ebp + 8], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x10879b0
mov ecx, dword [ebp - 8]
mov edx, dword [esi + 0x5c]
mov eax, dword [edx]
shr ecx, 2
add ecx, dword [ebp + 0x10]
xor edi, edi
mov dl, byte [ecx]
mov dword [ebp + 8], edi
cmp dl, byte [edi + ecx]
jne 0x1087ac2
inc edi
cmp edi, 0x10
jl 0x1087a75
lea edi, [ecx + 1]
mov dword [ebp - 0x30], 0x10
lea ebx, [ebx]
cmp dl, byte [edi - 1]
je 0x1087a98
inc dword [ebp + 8]
cmp dl, byte [edi]
je 0x1087a9f
inc dword [ebp + 8]
cmp dl, byte [edi + 1]
je 0x1087aa7
inc dword [ebp + 8]
cmp dl, byte [edi + 2]
je 0x1087aaf
inc dword [ebp + 8]
add edi, 4
sub dword [ebp - 0x30], 1
jne 0x1087a90
cmp dword [ebp + 8], 4
jl 0x1087b80
mov dword [ebp + 8], 0x10
lea esp, [esp]
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x40], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x40], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 8], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x1087ad0
mov eax, 0xaaaaaaab
mul dword [ebp - 8]
mov eax, dword [esi + 0x5c]
mov eax, dword [eax]
shr edx, 1
add edx, dword [ebp + 0x10]
xor edi, edi
mov cl, byte [edx]
mov dword [ebp + 8], edi
lea esp, [esp]
cmp cl, byte [edi + edx]
jne 0x1087be7
inc edi
cmp edi, 8
jl 0x1087ba0
lea edi, [edx + 1]
mov dword [ebp - 0x30], 8
cmp cl, byte [edi - 1]
je 0x1087bbd
inc dword [ebp + 8]
cmp cl, byte [edi]
je 0x1087bc4
inc dword [ebp + 8]
cmp cl, byte [edi + 1]
je 0x1087bcc
inc dword [ebp + 8]
cmp cl, byte [edi + 2]
je 0x1087bd4
inc dword [ebp + 8]
add edi, 4
sub dword [ebp - 0x30], 1
jne 0x1087bb5
cmp dword [ebp + 8], 2
jl 0x1087ca0
mov dword [ebp + 8], 8
mov edi, edi
mov ecx, dword [esi + 0xc]
movzx ebx, byte [edx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x40], ecx
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
mov dword [esi + 0xc], ebx
mov ecx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [edx + 1]
mov dword [ebp - 0x40], ecx
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
mov ecx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], ecx
mov dword [esi + 8], edi
movzx ebx, byte [edx + 2]
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
mov ecx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], ecx
mov dword [esi + 8], edi
movzx ebx, byte [edx + 3]
shr ecx, 0x18
movzx ecx, cl
xor ecx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + ecx*8 + 4]
shl edi, 8
xor edi, dword [eax + ecx*8]
add edx, 4
sub dword [ebp + 8], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x1087bf0
mov ecx, dword [ebp - 8]
mov edx, dword [esi + 0x5c]
mov eax, dword [edx]
shr ecx, 1
add ecx, dword [ebp + 0x10]
xor edi, edi
mov dl, byte [ecx]
mov dword [ebp + 8], edi
cmp dl, byte [edi + ecx]
jne 0x1087d02
inc edi
cmp edi, 4
jl 0x1087cb4
lea edi, [ecx + 1]
mov dword [ebp + 0x10], 4
lea esp, [esp]
cmp dl, byte [edi - 1]
je 0x1087cd8
inc dword [ebp + 8]
cmp dl, byte [edi]
je 0x1087cdf
inc dword [ebp + 8]
cmp dl, byte [edi + 1]
je 0x1087ce7
inc dword [ebp + 8]
cmp dl, byte [edi + 2]
je 0x1087cef
inc dword [ebp + 8]
add edi, 4
sub dword [ebp + 0x10], 1
jne 0x1087cd0
cmp dword [ebp + 8], 1
jl 0x1087dc0
mov dword [ebp + 8], 4
lea esp, [esp]
mov edx, dword [esi + 0xc]
movzx ebx, byte [ecx]
mov edi, dword [esi + 8]
mov dword [ebp - 0x40], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov dword [esi + 0xc], ebx
mov edx, ebx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 1]
mov dword [ebp - 0x40], edx
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 2]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
mov edx, ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 0x40], edx
mov dword [esi + 8], edi
movzx ebx, byte [ecx + 3]
shr edx, 0x18
movzx edx, dl
xor edx, ebx
mov ebx, dword [ebp - 0x40]
shld ebx, edi, 8
xor ebx, dword [eax + edx*8 + 4]
shl edi, 8
xor edi, dword [eax + edx*8]
add ecx, 4
sub dword [ebp + 8], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
jne 0x1087d10
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x50], eax
test edx, edx
jne 0x1087ddd
cmp ecx, eax
jae 0x1087ddd
test ecx, ecx
jbe 0x1087ddd
mov dword [esi + 0x28], ecx
mov edx, ecx
mov edi, dword [ebp - 0x14]
push edi
mov edi, dword [ebp - 0x34]
push edi
mov edi, dword [ebp - 0xc]
push edi
mov edi, dword [esi + 0x10]
push edi
push edx
mov edx, dword [ebp - 0x38]
push ecx
mov ecx, dword [ebp - 0x3c]
push edx
push ecx
push eax
push esi
call fcn.01039170
mov edx, dword [esi + 0x50]
mov edi, eax
mov dword [esi + 0x14], edx
cmp edi, 0x9641
je 0x1087e56
push esi
call fcn.01038160
cmp edi, 5
jne 0x1087e20
mov dword [esi + 0x48], 1
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
lea ecx, [esi + 8]
mov edi, eax
and edi, edx
cmp edi, 0xffffffff
je 0x1087e36
or eax, edx
jne 0x1087e56
mov eax, dword [esi + 0x14]
cmp eax, 0x100000
jbe 0x1087e45
mov eax, 0x100000
push ecx
mov ecx, dword [esi + 0x5c]
mov edx, dword [ecx]
push eax
mov eax, dword [esi + 0x10]
push eax
push edx
call fcn.01031080
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x10]
lea eax, [esi + 8]
push eax
mov eax, dword [esi + 0x5c]
push ecx
mov ecx, dword [eax]
push edx
push ecx
call fcn.01031080
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc