Function at 0x820320
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8c
push ebx
push ebp
mov ebp, dword [esp + 0xa4]
push esi
push edi
cmp ebp, 0xa
jb 0x820efa
mov edx, dword [esp + 0xb0]
mov edi, ebp
mov ebx, dword [esp + 0xa0]
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
add eax, ebx
mov dword [esp + 0x88], eax
lea eax, [edx + 4]
mov dword [esp + 0x14], eax
movzx eax, word [ecx + 2]
movzx esi, word [ecx]
mov dword [esp + 0x90], eax
movzx eax, word [ecx + 4]
add ecx, 6
sub edi, eax
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x90]
sub edi, eax
mov dword [esp + 0x8c], ecx
sub edi, esi
add ecx, esi
mov dword [esp + 0x98], esi
add eax, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
sub edi, 6
mov eax, dword [esp + 0xa4]
add eax, 3
shr eax, 2
lea ecx, [eax + ebx]
lea esi, [ecx + eax]
mov dword [esp + 0x7c], ecx
add eax, esi
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], eax
mov ebp, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], esi
mov esi, eax
mov eax, dword [edx]
shr eax, 0x10
movzx eax, al
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], eax
cmp edi, dword [esp + 0xac]
ja 0x820efa
push dword [esp + 0x98]
lea eax, [esp + 0x6c]
push dword [esp + 0x90]
push eax
call fcn.0081d0d0
add esp, 0xc
cmp eax, 0xffffff88
ja 0x820eff
mov eax, dword [esp + 0x90]
push eax
push dword [esp + 0x20]
lea eax, [esp + 0x5c]
push eax
call fcn.0081d0d0
add esp, 0xc
cmp eax, 0xffffff88
ja 0x820eff
push dword [esp + 0x94]
lea eax, [esp + 0x44]
push dword [esp + 0x14]
push eax
call fcn.0081d0d0
add esp, 0xc
cmp eax, 0xffffff88
ja 0x820eff
mov eax, dword [esp + 0x94]
add eax, dword [esp + 0x10]
push edi
push eax
lea eax, [esp + 0x34]
push eax
call fcn.0081d0d0
add esp, 0xc
cmp eax, 0xffffff88
ja 0x820eff
lea eax, [esp + 0x2c]
push eax
call fcn.0081d200
mov edi, eax
lea eax, [esp + 0x44]
push eax
call fcn.0081d200
or edi, eax
lea eax, [esp + 0x5c]
push eax
call fcn.0081d200
or edi, eax
lea eax, [esp + 0x74]
push eax
call fcn.0081d200
add esp, 0x10
or edi, eax
jne 0x8206b8
mov eax, dword [esp + 0x88]
mov ebp, dword [esp + 0x14]
add eax, 0xfffffff9
mov dword [esp + 0x8c], eax
cmp esi, eax
jae 0x8206a9
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x6c]
neg ebx
mov edx, dword [esp + 0x68]
and ecx, 0x1f
shl edx, cl
and ebx, 0x1f
mov ecx, ebx
mov edi, dword [esp + 0x30]
shr edx, cl
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x28], ebx
movzx eax, byte [ebp + edx*2 + 1]
add eax, dword [esp + 0x6c]
mov dword [esp + 0x1c], eax
movzx eax, byte [ebp + edx*2]
mov byte [ecx], al
inc ecx
mov edx, dword [esp + 0x54]
mov dword [esp + 0xa0], ecx
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x20]
movzx eax, byte [eax + edx*2]
movzx ebp, byte [ebp + edx*2 + 1]
mov byte [ecx], al
inc ecx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x44]
and ecx, 0x1f
add ebp, dword [esp + 0x58]
shl edx, cl
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx ebx, byte [ecx + edx*2 + 1]
movzx eax, byte [ecx + edx*2]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
add ebx, dword [esp + 0x44]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, edi
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x28]
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add edi, eax
movzx eax, byte [ecx + edx*2]
mov edx, dword [esp + 0x1c]
mov ecx, edx
mov byte [esi], al
and ecx, 0x1f
mov eax, dword [esp + 0x68]
shl eax, cl
mov ecx, dword [esp + 0x28]
shr eax, cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
movzx eax, byte [ecx + eax*2 + 1]
add eax, edx
mov edx, dword [esp + 0x54]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x1c]
movzx eax, byte [ecx + eax*2]
mov ecx, dword [esp + 0xa0]
mov byte [ecx], al
inc ecx
mov dword [esp + 0xa0], ecx
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x28]
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add eax, ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x58], eax
movzx eax, byte [ecx + edx*2]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x40]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x20], ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x28]
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add eax, ebx
mov dword [esp + 0x44], eax
movzx eax, byte [ecx + edx*2]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, edi
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x28]
shr edx, cl
movzx eax, byte [ebp + edx*2 + 1]
add eax, edi
mov dword [esp + 0x30], eax
movzx eax, byte [ebp + edx*2]
mov byte [esi + 1], al
lea eax, [esp + 0x2c]
push eax
add esi, 2
call fcn.0081d200
mov edi, eax
lea eax, [esp + 0x44]
push eax
call fcn.0081d200
or edi, eax
lea eax, [esp + 0x5c]
push eax
call fcn.0081d200
or edi, eax
lea eax, [esp + 0x74]
push eax
call fcn.0081d200
add esp, 0x10
or edi, eax
mov eax, dword [esp + 0x8c]
je 0x8204d6
mov ebx, dword [esp + 0xa0]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x28], esi
mov edi, dword [esp + 0x7c]
cmp ebx, edi
ja 0x820efa
cmp ebp, dword [esp + 0x80]
ja 0x820efa
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x24], eax
ja 0x820efa
mov ebp, dword [esp + 0x6c]
mov esi, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
cmp ebp, 0x20
ja 0x8207dd
cmp esi, dword [esp + 0x78]
jb 0x820717
mov eax, ebp
shr eax, 3
sub esi, eax
and ebp, 7
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebp
mov edx, dword [esi]
mov dword [esp + 0x68], edx
jmp 0x820762
cmp esi, edx
je 0x8207dd
mov ecx, ebp
mov dword [esp + 0x10], 0
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edx
jae 0x820740
mov ecx, esi
mov dword [esp + 0x10], 1
sub ecx, edx
imul eax, ecx, 0xfffffff8
sub esi, ecx
mov dword [esp + 0x70], esi
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [esi]
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], eax
jne 0x8207e1
mov edx, eax
lea eax, [edi - 4]
cmp ebx, eax
ja 0x8207d9
mov ebx, dword [esp + 0x18]
mov ecx, ebp
and ecx, 0x1f
neg ebx
shl edx, cl
and ebx, 0x1f
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx edi, byte [ecx + edx*2 + 1]
movzx eax, byte [ecx + edx*2]
add edi, ebp
mov ecx, dword [esp + 0xa0]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0x68]
mov dword [esp + 0xa0], ecx
mov ecx, edi
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
mov ebx, dword [esp + 0xa0]
shr eax, cl
mov ecx, dword [esp + 0x14]
movzx ebp, byte [ecx + eax*2 + 1]
movzx eax, byte [ecx + eax*2]
add ebp, edi
mov edi, dword [esp + 0x7c]
mov byte [ebx], al
inc ebx
mov dword [esp + 0x6c], ebp
mov dword [esp + 0xa0], ebx
jmp 0x8206ea
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x68]
mov edi, dword [esp + 0x70]
cmp ebp, 0x20
ja 0x820893
cmp edi, dword [esp + 0x78]
jb 0x82080e
mov eax, ebp
shr eax, 3
sub edi, eax
and ebp, 7
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebp
mov eax, dword [edi]
mov dword [esp + 0x68], eax
jmp 0x820853
cmp edi, edx
je 0x820893
mov ecx, ebp
mov dword [esp + 0x10], 0
shr ecx, 3
mov eax, edi
sub eax, ecx
cmp eax, edx
jae 0x820837
mov ecx, edi
mov dword [esp + 0x10], 1
sub ecx, edx
imul eax, ecx, 0xfffffff8
sub edi, ecx
mov dword [esp + 0x70], edi
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [edi]
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], eax
jne 0x820893
cmp ebx, dword [esp + 0x7c]
jae 0x8208d8
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add ebp, eax
mov al, byte [ecx + edx*2]
mov edx, dword [esp + 0x74]
mov byte [ebx], al
inc ebx
mov eax, dword [esp + 0x68]
mov dword [esp + 0x6c], ebp
jmp 0x8207e5
cmp ebx, dword [esp + 0x7c]
jae 0x8208d8
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
neg ecx
mov edi, dword [esp + 0x7c]
and ecx, 0x1f
mov dword [esp + 0x1c], ecx
nop
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x1c]
shr edx, cl
movzx eax, byte [esi + edx*2 + 1]
add ebp, eax
mov al, byte [esi + edx*2]
mov byte [ebx], al
inc ebx
mov eax, dword [esp + 0x68]
cmp ebx, edi
jb 0x8208b0
mov dword [esp + 0x6c], ebp
mov ebp, dword [esp + 0x58]
mov esi, dword [esp + 0x5c]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x60]
mov edi, dword [esp + 0x18]
cmp ebp, 0x20
ja 0x8209d0
cmp esi, dword [esp + 0x64]
jb 0x820915
mov eax, ebp
shr eax, 3
sub esi, eax
and ebp, 7
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], ebp
mov edx, dword [esi]
mov dword [esp + 0x54], edx
jmp 0x820960
cmp esi, edx
je 0x8209d0
mov ecx, ebp
mov dword [esp + 0x10], 0
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edx
jae 0x82093e
mov ecx, esi
mov dword [esp + 0x10], 1
sub ecx, edx
imul eax, ecx, 0xfffffff8
sub esi, ecx
mov dword [esp + 0x5c], esi
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [esi]
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], eax
jne 0x8209d4
mov edx, eax
mov eax, dword [esp + 0x80]
add eax, 0xfffffffc
cmp ebx, eax
ja 0x8209cc
mov ebx, edi
mov ecx, ebp
and ecx, 0x1f
neg ebx
shl edx, cl
and ebx, 0x1f
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx edi, byte [ecx + edx*2 + 1]
movzx eax, byte [ecx + edx*2]
add edi, ebp
mov ecx, dword [esp + 0x20]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0x54]
mov dword [esp + 0x20], ecx
mov ecx, edi
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
mov ebx, dword [esp + 0x20]
shr eax, cl
mov ecx, dword [esp + 0x14]
movzx ebp, byte [ecx + eax*2 + 1]
movzx eax, byte [ecx + eax*2]
add ebp, edi
mov byte [ebx], al
inc ebx
mov dword [esp + 0x58], ebp
mov dword [esp + 0x20], ebx
jmp 0x8208e4
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
nop dword [eax + eax]
cmp ebp, 0x20
ja 0x820a91
cmp edi, dword [esp + 0x64]
jb 0x820a09
mov eax, ebp
shr eax, 3
sub edi, eax
and ebp, 7
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebp
mov eax, dword [edi]
mov dword [esp + 0x54], eax
jmp 0x820a4e
cmp edi, edx
je 0x820a91
mov ecx, ebp
mov dword [esp + 0x10], 0
shr ecx, 3
mov eax, edi
sub eax, ecx
cmp eax, edx
jae 0x820a32
mov ecx, edi
mov dword [esp + 0x10], 1
sub ecx, edx
imul eax, ecx, 0xfffffff8
sub edi, ecx
mov dword [esp + 0x5c], edi
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [edi]
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], eax
jne 0x820a91
cmp ebx, dword [esp + 0x80]
jae 0x820ada
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add ebp, eax
mov al, byte [ecx + edx*2]
mov edx, dword [esp + 0x60]
mov byte [ebx], al
inc ebx
mov eax, dword [esp + 0x54]
mov dword [esp + 0x58], ebp
jmp 0x8209e0
cmp ebx, dword [esp + 0x80]
jae 0x820ada
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
neg ecx
mov edi, dword [esp + 0x80]
and ecx, 0x1f
mov dword [esp + 0x1c], ecx
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x1c]
shr edx, cl
movzx eax, byte [esi + edx*2 + 1]
add ebp, eax
mov al, byte [esi + edx*2]
mov byte [ebx], al
inc ebx
mov eax, dword [esp + 0x54]
cmp ebx, edi
jb 0x820ab2
mov dword [esp + 0x58], ebp
mov ebp, dword [esp + 0x44]
mov esi, dword [esp + 0x48]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x4c]
mov edi, dword [esp + 0x18]
cmp ebp, 0x20
ja 0x820bd2
cmp esi, dword [esp + 0x50]
jb 0x820b17
mov eax, ebp
shr eax, 3
sub esi, eax
and ebp, 7
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebp
mov edx, dword [esi]
mov dword [esp + 0x40], edx
jmp 0x820b62
cmp esi, edx
je 0x820bd2
mov ecx, ebp
mov dword [esp + 0x10], 0
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edx
jae 0x820b40
mov ecx, esi
mov dword [esp + 0x10], 1
sub ecx, edx
imul eax, ecx, 0xfffffff8
sub esi, ecx
mov dword [esp + 0x48], esi
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [esi]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], eax
jne 0x820bd6
mov edx, eax
mov eax, dword [esp + 0x84]
add eax, 0xfffffffc
cmp ebx, eax
ja 0x820bce
mov ebx, edi
mov ecx, ebp
and ecx, 0x1f
neg ebx
shl edx, cl
and ebx, 0x1f
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx edi, byte [ecx + edx*2 + 1]
movzx eax, byte [ecx + edx*2]
add edi, ebp
mov ecx, dword [esp + 0x24]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], ecx
mov ecx, edi
and ecx, 0x1f
shl eax, cl
mov ecx, ebx
mov ebx, dword [esp + 0x24]
shr eax, cl
mov ecx, dword [esp + 0x14]
movzx ebp, byte [ecx + eax*2 + 1]
movzx eax, byte [ecx + eax*2]
add ebp, edi
mov byte [ebx], al
inc ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x24], ebx
jmp 0x820ae6
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x48]
nop
cmp ebp, 0x20
ja 0x820c91
cmp edi, dword [esp + 0x50]
jb 0x820c09
mov eax, ebp
shr eax, 3
sub edi, eax
and ebp, 7
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebp
mov eax, dword [edi]
mov dword [esp + 0x40], eax
jmp 0x820c4e
cmp edi, edx
je 0x820c91
mov ecx, ebp
mov dword [esp + 0x10], 0
shr ecx, 3
mov eax, edi
sub eax, ecx
cmp eax, edx
jae 0x820c32
mov ecx, edi
mov dword [esp + 0x10], 1
sub ecx, edx
imul eax, ecx, 0xfffffff8
sub edi, ecx
mov dword [esp + 0x48], edi
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [edi]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], eax
jne 0x820c91
cmp ebx, dword [esp + 0x84]
jae 0x820ce1
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add ebp, eax
mov al, byte [ecx + edx*2]
mov edx, dword [esp + 0x4c]
mov byte [ebx], al
inc ebx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x44], ebp
jmp 0x820be0
mov edi, dword [esp + 0x14]
cmp ebx, dword [esp + 0x84]
jae 0x820ce5
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
mov esi, ecx
nop dword [eax]
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, esi
shr edx, cl
movzx eax, byte [edi + edx*2 + 1]
add ebp, eax
mov al, byte [edi + edx*2]
mov byte [ebx], al
inc ebx
mov eax, dword [esp + 0x40]
cmp ebx, dword [esp + 0x84]
jb 0x820cb0
mov esi, dword [esp + 0x28]
mov dword [esp + 0x44], ebp
jmp 0x820ce5
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x34]
cmp ebp, 0x20
ja 0x820dc4
cmp ecx, edx
jb 0x820d1c
mov eax, ebp
shr eax, 3
sub ecx, eax
and ebp, 7
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], ebp
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
jmp 0x820d63
cmp ecx, ebx
je 0x820dc4
mov edx, ebp
mov dword [esp + 0x10], 0
shr edx, 3
mov eax, ecx
sub eax, edx
cmp eax, ebx
jae 0x820d45
mov edx, ecx
mov dword [esp + 0x10], 1
sub edx, ebx
imul eax, edx, 0xfffffff8
sub ecx, edx
mov dword [esp + 0x34], ecx
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [ecx]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], eax
jne 0x820dce
mov edx, eax
mov eax, dword [esp + 0x88]
add eax, 0xfffffffc
cmp esi, eax
ja 0x820dca
mov ebx, dword [esp + 0x18]
mov ecx, ebp
and ecx, 0x1f
neg ebx
shl edx, cl
and ebx, 0x1f
mov ecx, ebx
shr edx, cl
movzx edi, byte [edi + edx*2 + 1]
add edi, ebp
mov ebp, dword [esp + 0x14]
mov ecx, edi
and ecx, 0x1f
movzx eax, byte [ebp + edx*2]
mov byte [esi], al
mov eax, dword [esp + 0x2c]
shl eax, cl
mov ecx, ebx
shr eax, cl
movzx ebp, byte [ebp + eax*2 + 1]
add ebp, edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x30], ebp
movzx eax, byte [edi + eax*2]
mov byte [esi + 1], al
add esi, 2
jmp 0x820ce9
mov eax, dword [esp + 0x2c]
jmp 0x820dd2
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x18]
cmp ebp, 0x20
ja 0x820e85
cmp ecx, edx
jb 0x820dfd
mov eax, ebp
shr eax, 3
sub ecx, eax
and ebp, 7
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], ebp
mov eax, dword [ecx]
mov dword [esp + 0x2c], eax
jmp 0x820e48
cmp ecx, dword [esp + 0x38]
je 0x820e85
mov edx, ebp
mov dword [esp + 0x10], 0
shr edx, 3
mov eax, ecx
sub eax, edx
cmp eax, dword [esp + 0x38]
jae 0x820e2c
mov edx, ecx
mov dword [esp + 0x10], 1
sub edx, dword [esp + 0x38]
imul eax, edx, 0xfffffff8
sub ecx, edx
mov dword [esp + 0x34], ecx
add ebp, eax
cmp dword [esp + 0x10], 0
mov eax, dword [ecx]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], eax
jne 0x820e85
cmp esi, dword [esp + 0x88]
jae 0x820ebe
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
neg ecx
and ecx, 0x1f
shr edx, cl
mov ecx, dword [esp + 0x34]
movzx eax, byte [edi + edx*2 + 1]
add ebp, eax
mov al, byte [edi + edx*2]
mov edx, dword [esp + 0x3c]
mov byte [esi], al
inc esi
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], ebp
jmp 0x820dd6
cmp esi, dword [esp + 0x88]
jae 0x820ebe
neg ebx
and ebx, 0x1f
mov ecx, ebp
mov edx, eax
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
movzx eax, byte [edi + edx*2 + 1]
add ebp, eax
mov al, byte [edi + edx*2]
mov byte [esi], al
inc esi
mov eax, dword [esp + 0x2c]
cmp esi, dword [esp + 0x88]
jb 0x820e93
mov dword [esp + 0x30], ebp
lea eax, [esp + 0x2c]
push eax
call fcn.0081fd20
mov edx, eax
lea eax, [esp + 0x44]
push eax
call fcn.0081fd20
and edx, eax
lea eax, [esp + 0x5c]
push eax
call fcn.0081fd20
and edx, eax
lea eax, [esp + 0x74]
push eax
call fcn.0081fd20
add esp, 0x10
test eax, edx
mov eax, dword [esp + 0xa4]
jne 0x820eff
mov eax, 0xffffffec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret