Function at 0x520860
Capabilities:
Encrypt data using speck
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov esi, ecx
mov eax, dword [ecx + 0x24c]
mov dword [ebp - 0x3c], 0
test eax, eax
jne 0x521593
mov ebx, dword [esi + 4]
mov edi, dword [esi + 0x34]
mov dword [ebp - 0x2c], 2
cmp dword [esi + 0x14], 0x1c
jb 0x52108a
lea eax, [esi + 8]
mov dword [ebp - 0x4c], eax
push eax
call fcn.004c5c40
add esp, 4
mov eax, dword [esi]
cmp eax, 7
mov dword [ebp - 0x20], esi
je 0x520cda
cmp eax, 8
jne 0x5208c1
mov esi, dword [ebp - 0x20]
jmp 0x520e02
cmp eax, 9
jne 0x5208ce
mov esi, dword [ebp - 0x20]
jmp 0x520b50
mov dword [ebp - 0x28], 0xffffffe1
cmp eax, 0xa
mov ecx, ebx
mov esi, dword [ebp - 0x20]
jne 0x521096
jmp 0x520f1e
add ecx, 8
mov dword [esi + 0xc], ecx
shr eax, 8
and eax, dword [ebx*4 + 0x6e4b60]
lea eax, [edx + eax*4]
movzx edx, word [edx + 2]
lea edx, [eax + edx*4]
mov bl, byte [edx]
jmp 0x520933
mov edi, dword [esi + 0x10]
movzx ebx, word [edi]
shrd eax, ebx, 0x10
mov dword [esi + 8], eax
xor ecx, 0x10
mov dword [esi + 0xc], ecx
add dword [esi + 0x14], 0xfffffffe
add edi, 2
mov dword [esi + 0x10], edi
shr eax, cl
movzx edi, al
lea edx, [edx + edi*4]
movzx ebx, byte [edx]
cmp ebx, 9
jae 0x5208e8
mov edi, dword [ebp - 0x14]
movzx eax, bl
add eax, ecx
mov dword [esi + 0xc], eax
mov al, byte [edx + 2]
mov ecx, dword [esi + 0x60]
mov byte [ecx + edi], al
dec dword [esi + 0xc0]
inc edi
mov dword [ebp - 0x14], edi
cmp edi, dword [esi + 0x40]
je 0x521506
mov bh, byte [ebp - 0x18]
inc dword [ebp - 0x10]
je 0x520b40
cmp dword [esi + 0x14], 0x1b
jbe 0x52120b
mov bl, al
cmp dword [esi + 0xc0], 0
je 0x521162
mov eax, dword [esi + 0x6c]
mov byte [ebp - 0x18], bl
movzx ecx, bl
movzx edx, bh
mov dl, byte [eax + edx + 0x100]
or dl, byte [eax + ecx]
movzx eax, dl
mov ecx, dword [esi + 0x78]
mov edx, dword [esi + 0x70]
movzx eax, byte [edx + eax]
mov edx, dword [ecx + eax*4]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp ecx, 0x10
jb 0x520923
jmp 0x520906
mov ecx, esi
call fcn.004c0580
jmp 0x520b69
mov ebx, dword [esi + 0x10]
movzx edi, word [ebx]
shrd edx, edi, 0x10
mov dword [esi + 8], edx
add dword [esi + 0x14], 0xfffffffe
xor ecx, 0x10
add ebx, 2
mov edi, edx
shr edi, cl
mov dword [esi + 0x10], ebx
movzx eax, di
mov dword [ebp - 0x18], eax
sub ecx, 0xfffffff0
mov dword [esi + 0xc], ecx
jb 0x520a0b
jmp 0x520a25
mov dword [ebp - 0x1c], eax
cmp ecx, 0xf
ja 0x5209c5
mov edi, edx
shr edi, cl
movzx eax, di
mov dword [ebp - 0x18], eax
or ecx, 0x10
mov dword [esi + 0xc], ecx
mov ebx, dword [esi + 0x10]
movzx edi, word [ebx]
shrd edx, edi, 0x10
mov dword [esi + 8], edx
add dword [esi + 0x14], 0xfffffffe
xor ecx, 0x10
add ebx, 2
mov dword [esi + 0x10], ebx
shr edx, cl
mov eax, dword [ebp - 0x1c]
and edx, dword [eax*4 + 0x6e4b40]
add ecx, eax
add ecx, 0xfffffff0
mov dword [esi + 0xc], ecx
shl edx, 0x10
add edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
jmp 0x520c0d
add eax, 8
mov dword [esi + 0xc], eax
shr edx, 8
and edx, dword [ecx*4 + 0x6e4b60]
lea ecx, [edi + edx*4]
movzx edx, word [edi + 2]
lea edi, [ecx + edx*4]
mov cl, byte [edi]
jmp 0x520ba0
lea edi, [eax - 0xa]
mov ecx, eax
add ecx, 0xfffffffc
xor edx, edx
cmp ax, 0xa
setb dl
cmovae ecx, edi
shl ecx, 2
mov eax, 0x605142
shr eax, cl
and eax, 7
mov ecx, dword [esi + 0x48]
add ecx, edx
add ecx, 2
and ecx, 3
mov ecx, dword [esi + ecx*4 + 0x4c]
add eax, ecx
add eax, 0xfffffffd
test eax, eax
mov edx, SysReAllocString
cmovg edx, eax
mov dword [esi + 0x10c], edx
mov dword [ebp - 0x1c], 0
jmp 0x520aed
mov dword [esi + 0x10c], eax
cmp ax, 3
ja 0x520a68
mov edx, eax
not edx
xor edi, edi
inc edi
mov ecx, eax
shr edi, cl
mov dword [esi + 0xb4], edi
mov eax, dword [esi + 0x48]
add edx, eax
and edx, 3
mov edx, dword [esi + edx*4 + 0x4c]
mov dword [esi + 0x10c], edx
mov dword [ebp - 0x1c], edi
sub eax, edi
mov dword [esi + 0x48], eax
mov edi, dword [ebp - 0x14]
jmp 0x520c2c
mov ecx, dword [esi + 0x10]
mov ebx, edx
movzx edx, word [ecx]
shrd ebx, edx, 0x10
mov edx, ebx
mov dword [esi + 8], ebx
xor eax, 0x10
mov dword [esi + 0xc], eax
add dword [esi + 0x14], 0xfffffffe
add ecx, 2
mov dword [esi + 0x10], ecx
jmp 0x520b88
sete al
movzx eax, al
mov dword [ebp - 0x1c], eax
mov dword [esi + 0xb4], eax
mov eax, dword [esi + 0x48]
dec eax
mov dword [esi + 0x48], eax
and eax, 3
mov edx, dword [esi + eax*4 + 0x4c]
mov dword [esi + 0x10c], edx
jmp 0x520c2c
cmp dword [esi + 0xb8], 0
jle 0x521548
mov edi, dword [ebp - 0x14]
cmp dword [esi + 0x10c], 0
mov dword [ebp - 0x14], edi
jns 0x520b18
cmp dword [esi + 0xc8], 0
je 0x5209b9
mov eax, dword [esi + 0x98]
movzx ecx, byte [esi + 0x104]
mov edi, dword [eax + ecx*4]
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
cmp eax, 0x10
jae 0x520af5
mov ebx, edx
mov ecx, eax
shr edx, cl
movzx ecx, dl
lea edi, [edi + ecx*4]
movzx ecx, byte [edi]
cmp ecx, 9
jae 0x520a47
movzx ecx, cl
add ecx, eax
mov dword [esi + 0xc], ecx
movzx eax, word [edi + 2]
dec dword [esi + 0xc8]
mov dword [esi + 0xb4], 0
cmp eax, 0xf
jbe 0x520ab6
mov edx, ebx
mov dword [ebp - 0x10], eax
movzx eax, byte [esi + eax + 0x270]
cmp eax, 0x10
ja 0x5209f3
cmp ecx, 0x10
jb 0x520bfc
mov edx, dword [esi + 0x10]
movzx edi, word [edx]
shrd ebx, edi, 0x10
mov dword [esi + 8], ebx
add dword [esi + 0x14], 0xfffffffe
xor ecx, 0x10
add edx, 2
mov dword [esi + 0x10], edx
mov edx, ebx
mov edi, dword [ebp - 0x14]
shr edx, cl
and edx, dword [eax*4 + 0x6e4b80]
add ecx, eax
mov dword [esi + 0xc], ecx
mov cl, byte [esi + 0xf0]
shl edx, cl
mov eax, dword [ebp - 0x10]
add edx, dword [esi + eax*4 + 0x490]
mov dword [esi + 0x10c], edx
mov dword [ebp - 0x1c], 0
mov ecx, dword [esi + 0x38]
mov eax, dword [esi + 0x3c]
cmp eax, ecx
je 0x520c40
cmp edi, ecx
cmovl ecx, edi
mov dword [esi + 0x3c], ecx
mov eax, ecx
mov ebx, dword [esi + 0x108]
mov ecx, edx
sub ecx, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], edx
jg 0x520f4e
mov ecx, dword [ebp - 0x14]
sub ecx, edx
and ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
mov edi, dword [esi + 0x60]
mov dword [ebp - 0x1c], edi
mov edi, edx
and edi, 3
mov eax, dword [ebp - 0x18]
mov dword [esi + edi*4 + 0x4c], eax
mov eax, ecx
mov ecx, dword [ebp - 0x14]
lea edi, [ebx + ecx]
inc edx
mov dword [esi + 0x48], edx
sub dword [esi + 0xb8], ebx
lea edx, [eax + ebx]
mov ebx, dword [ebp - 0x1c]
movups xmm0, xmmword [ebx + eax]
movups xmmword [ebx + ecx], xmm0
cmp edx, ecx
setg bl
cmp edi, eax
setg bh
test bl, bh
jne 0x520f18
mov ebx, edi
mov edi, dword [esi + 0x40]
cmp ebx, edi
jge 0x520f18
mov ecx, ebx
cmp edx, edi
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
jge 0x521316
cmp ebx, 0x11
mov edi, ecx
jge 0x520eda
cmp dword [esi + 0xb8], 0
jle 0x521305
mov ecx, dword [esi + 0x14]
cmp ecx, 0x1c
jb 0x521084
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x520ef3
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], edi
mov edi, dword [esi + 0x68]
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
cmp eax, 0x10
jb 0x520d30
mov ecx, dword [esi + 0x10]
movzx ebx, word [ecx]
shrd edx, ebx, 0x10
mov dword [esi + 8], edx
xor eax, 0x10
mov dword [esi + 0xc], eax
mov ebx, dword [ebp - 0x18]
add ebx, 0xfffffffe
mov dword [ebp - 0x18], ebx
mov dword [esi + 0x14], ebx
add ecx, 2
mov dword [esi + 0x10], ecx
mov ebx, edx
mov ecx, eax
shr ebx, cl
movzx ecx, bl
lea edi, [edi + ecx*4]
movzx ecx, byte [edi]
cmp ecx, 9
mov dword [ebp - 0x24], edx
jae 0x520e5f
movzx ecx, cl
add ecx, eax
mov dword [ebp - 0x30], ecx
mov dword [esi + 0xc], ecx
movzx edi, word [edi + 2]
movzx ecx, byte [edi*8 + 0x6e1312]
movzx eax, byte [edi*8 + 0x6e1313]
mov dword [ebp - 0x10], eax
movsx ebx, byte [edi*8 + 0x6e1314]
movzx eax, byte [edi*8 + 0x6e1315]
mov edx, esi
movzx esi, word [edi*8 + 0x6e1316]
mov dword [ebp - 0x28], esi
mov esi, edx
movzx edx, word [edi*8 + 0x6e1318]
mov dword [ebp - 0x38], edx
mov dword [esi + 0x10c], ebx
mov dword [esi + 0xb4], eax
mov edi, dword [esi + 0x74]
mov al, byte [edi + eax]
mov byte [esi + 0x104], al
xor ebx, ebx
test ecx, ecx
jne 0x520e80
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x30]
cmp al, 0x10
ja 0x521184
cmp ecx, 0x10
jae 0x520e35
shr edx, cl
and edx, dword [eax*4 + 0x6e4b80]
add ecx, eax
mov dword [esi + 0xc], ecx
add edx, dword [ebp - 0x38]
mov dword [esi + 0x108], edx
mov eax, dword [ebp - 0x1c]
dec eax
mov dword [esi + 0xc4], eax
add ebx, dword [ebp - 0x28]
je 0x520b50
sub dword [esi + 0xb8], ebx
mov eax, dword [esi + 0xb0]
test eax, eax
mov dword [ebp - 0x14], edi
jne 0x5210a1
mov eax, dword [esi + 0x44]
lea ecx, [edi - 1]
and ecx, eax
lea edx, [edi - 2]
and edx, eax
mov edi, dword [esi + 0x60]
mov al, byte [edi + ecx]
mov ecx, ebx
mov bh, byte [edi + edx]
neg ecx
mov dword [ebp - 0x10], ecx
jmp 0x520966
mov eax, dword [esi + 0x10]
movzx edi, word [eax]
shrd edx, edi, 0x10
mov dword [esi + 8], edx
mov edi, dword [ebp - 0x18]
add edi, 0xfffffffe
mov dword [esi + 0x14], edi
mov edi, dword [ebp - 0x14]
add eax, 2
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x10]
xor ecx, 0x10
jmp 0x520dd2
add eax, 8
mov dword [esi + 0xc], eax
shr ebx, 8
and ebx, dword [ecx*4 + 0x6e4b60]
lea ecx, [edi + ebx*4]
movzx edi, word [edi + 2]
lea edi, [ecx + edi*4]
mov cl, byte [edi]
jmp 0x520d4b
cmp cl, 0x10
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x34], ecx
ja 0x521298
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10
mov eax, dword [ebp - 0x10]
jb 0x520ebf
mov eax, dword [esi + 0x10]
movzx edi, word [eax]
shrd edx, edi, 0x10
mov dword [esi + 8], edx
mov ebx, dword [ebp - 0x18]
add ebx, 0xfffffffe
mov dword [ebp - 0x18], ebx
mov dword [esi + 0x14], ebx
add eax, 2
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x10]
xor ecx, 0x10
mov ebx, edx
shr ebx, cl
mov edi, dword [ebp - 0x34]
and ebx, dword [edi*4 + 0x6e4b80]
add ecx, edi
mov dword [esi + 0xc], ecx
mov edi, dword [ebp - 0x14]
jmp 0x520dc5
mov ecx, dword [ebp - 0x1c]
add edx, ecx
add eax, ecx
cmp ebx, 0x21
jae 0x520eff
movups xmm0, xmmword [eax + 0x10]
movups xmmword [edx + 0x10], xmm0
jmp 0x520ccd
mov ecx, esi
call fcn.004c0090
jmp 0x520cda
add edx, 0x10
add eax, 0x10
lea ecx, [ebx - 0x10]
push ecx
push eax
push edx
call fcn.00543ce0
add esp, 0xc
jmp 0x520ccd
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi + 0x40]
mov ebx, ecx
test ecx, ecx
jle 0x520f48
mov ecx, edi
sub ecx, dword [esi + 0x10c]
mov edx, dword [esi + 0x60]
and ecx, dword [esi + 0x44]
mov cl, byte [edx + ecx]
mov byte [edx + edi], cl
inc edi
lea ecx, [ebx - 1]
cmp eax, edi
jne 0x520f21
jmp 0x5212fc
dec ebx
jmp 0x520ccd
cmp edx, 0x7ffffffc
jg 0x52151c
mov edi, dword [ebp - 0x3c]
sub edi, ecx
mov esi, dword [ebp - 0x20]
jge 0x521382
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffffc
mov dword [ebp - 0x28], 0xfffffff4
cmp ecx, 0x1b
ja 0x521096
mov edx, dword [esi + 0x248]
xor ecx, ecx
cmp dword [edx + 0x7c], 0
mov dword [ebp - 0x24], edx
jne 0x52155b
movzx ecx, cl
mov dword [ebp - 0x38], ecx
mov ebx, dword [edx + ecx*4 + 0xc4]
mov edx, dword [ebp - 0x10]
movzx ecx, byte [ebx + edx]
mov dword [ebp - 0x34], ecx
not eax
mov edi, dword [ebp - 0x18]
sub edi, dword [ebp - 0x3c]
add edi, eax
mov eax, dword [ecx*4 + 0x6e4b80]
and eax, edi
imul eax, edx
mov ecx, ebx
add eax, dword [ebx + edx*4 + 0x20]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebx + eax*4 + 0x1c4]
mov ebx, dword [ebp - 0x1c]
add dword [esi + 0x48], ebx
mov ebx, ecx
mov dword [ebp - 0x18], edi
mov ecx, dword [ebp - 0x34]
sar edi, cl
mov ecx, eax
mov eax, dword [eax + 0xc]
cmp edi, eax
jge 0x52144f
cmp byte [ebx + edx], 0
je 0x52144f
mov edx, ebx
mov eax, ecx
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
cmp byte [edx + ecx], 0
je 0x521096
mov ecx, dword [edx + 0xa4]
test ecx, ecx
je 0x521528
mov dword [ebp - 0x28], 0xfffffff5
cmp edi, dword [eax + 0xc]
jge 0x521096
add ecx, dword [ebp - 0x30]
movsx edx, word [eax + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x60]
add eax, ebx
cmp edi, edx
je 0x521072
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push ecx
push eax
call fcn.0053be30
add esp, 0x14
test eax, eax
je 0x521534
sub dword [esi + 0xb8], eax
add ebx, eax
cmp ebx, dword [esi + 0x40]
jge 0x521439
mov edi, ebx
mov ebx, dword [ebp - 0x10]
jmp 0x520ccd
mov edi, dword [ebp - 0x10]
push edi
push ecx
push eax
call fcn.00543ce0
add esp, 0xc
mov eax, edi
jmp 0x521057
mov dword [esi], 7
mov dword [esi + 0x34], edi
mov dword [esi + 4], ebx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp ecx, 0x18
mov dword [ebp - 0x10], ebx
jae 0x521608
mov edx, dword [esi + 0x100]
shr eax, cl
movzx eax, al
mov bl, byte [edx + eax*4]
movzx edx, word [edx + eax*4 + 2]
neg dword [ebp - 0x10]
jmp 0x52111c
mov edx, dword [esi + 0x10]
mov edi, dword [edx]
shrd ebx, edi, 0x18
mov edi, dword [ebp - 0x14]
mov dword [esi + 8], ebx
xor ecx, 0x18
mov dword [esi + 0xc], ecx
add dword [esi + 0x14], 0xfffffffd
add edx, 3
mov dword [esi + 0x10], edx
shr ebx, cl
movzx ecx, bl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx + ecx*4]
movzx edx, word [edx + ecx*4 + 2]
mov ecx, dword [esi + 0x60]
mov byte [ecx + edi], al
dec dword [esi + 0xc0]
inc edi
mov dword [ebp - 0x14], edi
cmp edi, dword [esi + 0x40]
je 0x521506
inc dword [ebp - 0x10]
je 0x520b40
cmp dword [esi + 0x14], 0x1b
jbe 0x52120b
cmp dword [esi + 0xc0], 0
je 0x52159e
mov eax, dword [esi + 0x100]
mov dword [ebp - 0x18], eax
movzx edi, bl
mov ecx, dword [esi + 0xc]
cmp bl, 9
jae 0x521243
add ecx, edi
mov dword [esi + 0xc], ecx
mov ebx, dword [esi + 8]
mov eax, edx
cmp ecx, 0x18
mov edi, dword [ebp - 0x14]
jb 0x5210ea
jmp 0x5210cb
mov ecx, esi
call fcn.004c02d0
mov eax, dword [esi + 0xb0]
test eax, eax
je 0x52097f
mov ebx, dword [ebp - 0x10]
neg ebx
mov edi, dword [ebp - 0x14]
jmp 0x520e08
cmp ecx, 0x10
jb 0x5211ab
mov eax, dword [esi + 0x10]
movzx edi, word [eax]
shrd edx, edi, 0x10
mov dword [esi + 8], edx
mov edi, dword [ebp - 0x18]
add edi, 0xfffffffe
mov dword [ebp - 0x18], edi
mov dword [esi + 0x14], edi
add eax, 2
mov dword [esi + 0x10], eax
xor ecx, 0x10
mov eax, edx
shr eax, cl
movzx eax, ax
add ecx, 0x10
mov dword [esi + 0xc], ecx
cmp ecx, 0x18
jae 0x5211de
shr edx, cl
mov edi, dword [ebp - 0x10]
and edx, dword [edi*4 + 0x6e4b40]
add ecx, edi
add ecx, 0xfffffff0
mov dword [esi + 0xc], ecx
shl edx, 0x10
or edx, eax
mov edi, dword [ebp - 0x14]
jmp 0x520de0
mov edi, dword [esi + 0x10]
mov dword [ebp - 0x24], edi
mov esi, ebx
mov ebx, dword [edi]
shrd edx, ebx, 0x18
mov ebx, esi
mov esi, dword [ebp - 0x20]
mov dword [esi + 8], edx
mov edi, dword [ebp - 0x18]
add edi, 0xfffffffd
mov dword [esi + 0x14], edi
mov edi, dword [ebp - 0x24]
add edi, 3
mov dword [esi + 0x10], edi
xor ecx, 0x18
jmp 0x5211bd
mov dword [esi], 8
mov ebx, dword [ebp - 0x10]
neg ebx
mov edi, dword [ebp - 0x14]
jmp 0x52108a
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
shrd ebx, eax, 0x10
mov dword [esi + 8], ebx
add dword [esi + 0x14], 0xfffffffe
xor ecx, 0x10
mov eax, dword [ebp - 0x1c]
add eax, 2
mov dword [esi + 0x10], eax
jmp 0x52124d
mov eax, dword [ebp - 0x4c]
mov ebx, dword [eax]
cmp ecx, 0x10
jae 0x52121e
movzx eax, dx
mov dword [ebp - 0x1c], eax
mov eax, ebx
shr eax, cl
mov dword [ebp - 0x28], eax
movzx edx, al
mov eax, dword [ebp - 0x18]
lea edx, [eax + edx*4]
mov eax, dword [ebp - 0x1c]
lea eax, [edx + eax*4]
mov dword [ebp - 0x1c], eax
lea edx, [ecx + 8]
mov dword [esi + 0xc], edx
mov eax, dword [ebp - 0x28]
shr eax, 8
and eax, dword [edi*4 + 0x6e4b60]
mov edi, dword [ebp - 0x1c]
movzx edx, byte [edi + eax*4]
add ecx, edx
add ecx, 8
mov dword [esi + 0xc], ecx
movzx eax, word [edi + eax*4 + 2]
jmp 0x521155
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10
jb 0x5212c2
mov eax, dword [esi + 0x10]
movzx edi, word [eax]
shrd edx, edi, 0x10
mov dword [esi + 8], edx
mov edi, dword [ebp - 0x18]
add edi, 0xfffffffe
mov dword [ebp - 0x18], edi
mov dword [esi + 0x14], edi
add eax, 2
mov dword [esi + 0x10], eax
xor ecx, 0x10
mov eax, edx
shr eax, cl
movzx edi, ax
add ecx, 0x10
mov dword [esi + 0xc], ecx
cmp ecx, 0x18
mov dword [ebp - 0x24], edi
jae 0x521629
mov eax, dword [ebp - 0x10]
mov ebx, edx
shr ebx, cl
mov edi, dword [ebp - 0x34]
and ebx, dword [edi*4 + 0x6e4b40]
add ecx, edi
add ecx, 0xfffffff0
shl ebx, 0x10
add ebx, dword [ebp - 0x24]
jmp 0x520ecf
mov dword [esi], 0x10
dec ebx
jmp 0x52130b
mov dword [esi], 0xe
xor eax, eax
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x52108a
mov ecx, ebx
mov edi, edx
jmp 0x520f1e
mov esi, dword [edi + 4]
lea edx, [esi - 1]
xor ecx, ecx
dec ecx
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
mov ecx, eax
add cl, 9
mov ebx, edx
sar ebx, cl
inc eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
jne 0x52132b
mov ecx, dword [ebp - 0x1c]
mov dword [edi + 0x98], ecx
test esi, esi
jle 0x521399
xor esi, esi
inc esi
mov ecx, dword [ebp - 0x1c]
shl esi, cl
xor eax, eax
xor edx, edx
dec eax
mov ecx, eax
inc eax
cmp dword [edi + ecx*4 + 0x60], edx
jl 0x521359
mov ebx, edx
mov ecx, dword [ebp - 0x1c]
sar ebx, cl
mov byte [edi + ebx + 0x9c], al
add edx, esi
cmp edx, dword [edi + 4]
jl 0x521358
mov eax, dword [edi + 0x98]
mov dword [ebp - 0x1c], eax
jmp 0x521399
mov dword [ebp - 0x18], edi
mov edi, dword [esi + 0x24c]
mov ecx, dword [edi + 0x98]
mov dword [ebp - 0x1c], ecx
cmp ecx, 0xffffffff
je 0x52131f
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
sar eax, cl
movzx eax, byte [edi + eax + 0x9c]
dec eax
mov edx, dword [ebp - 0x18]
mov ecx, eax
inc eax
cmp dword [edi + ecx*4 + 0x60], edx
jle 0x5213ad
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
add ecx, edx
cmp dword [edi + 4], ecx
jl 0x52141c
mov esi, dword [ebp - 0x20]
mov ecx, dword [esi + 0x48]
mov edx, ecx
and edx, 3
mov ebx, dword [esi + 0x10c]
mov dword [esi + edx*4 + 0x4c], ebx
inc ecx
mov dword [esi + 0x48], ecx
mov ecx, dword [ebp - 0x10]
sub dword [esi + 0xb8], ecx
mov dword [edi + 8], eax
mov edx, dword [ebp - 0x18]
sub edx, dword [edi + eax*4 + 0x58]
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 0
mov ecx, esi
mov edi, dword [ebp - 0x14]
mov edx, edi
call fcn.00670030
add eax, edi
mov edi, eax
cmp eax, dword [esi + 0x40]
jge 0x521428
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x20]
jmp 0x520ccd
mov dword [ebp - 0x28], 0xffffffee
jmp 0x521096
mov esi, dword [ebp - 0x20]
mov dword [esi], 0xf
xor eax, eax
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x521447
mov dword [esi], 0xf
xor eax, eax
inc eax
mov dword [ebp - 0x2c], eax
mov edi, ebx
mov ebx, dword [ebp - 0x10]
jmp 0x52108a
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x40], ebx
mov edx, dword [ebp - 0x24]
movzx ebx, byte [edx + 0xc0]
cmp ebx, 2
jae 0x52147b
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x48]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x44]
jmp 0x521004
xor edx, edx
inc edx
mov ecx, dword [ebp - 0x34]
shl edx, cl
and edx, 0xfffffffe
imul eax, edx
sub dword [ebp - 0x18], eax
xor edi, edi
jmp 0x52149f
mov edx, dword [ebp - 0x18]
mov eax, edi
inc eax
mov dword [ebp - 0x18], edx
mov edi, eax
cmp ebx, eax
je 0x521467
cmp dword [ebp - 0x38], edi
je 0x521490
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx + edi*4 + 0xc4]
mov ecx, dword [ebp - 0x10]
movzx ecx, byte [eax + ecx]
test ecx, ecx
je 0x521490
mov esi, eax
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + edi*4 + 0x1c4]
xor eax, eax
inc eax
shl eax, cl
and eax, 0xfffffffe
mov dword [ebp - 0x1c], edx
imul eax, dword [edx + 0xc]
mov edx, dword [ebp - 0x18]
sub edx, eax
jge 0x521493
mov edx, dword [ecx*4 + 0x6e4b80]
mov edi, dword [ebp - 0x18]
and edx, edi
sar edi, cl
mov ecx, dword [ebp - 0x10]
imul edx, ecx
add edx, dword [esi + ecx*4 + 0x20]
mov dword [ebp - 0x30], edx
mov edx, esi
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
jmp 0x521004
mov dword [esi], 0xd
mov ebx, dword [ebp - 0x10]
not ebx
xor eax, eax
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x521216
mov dword [ebp - 0x28], 0xfffffff0
jmp 0x521096
mov dword [ebp - 0x28], 0xffffffed
jmp 0x521096
xor eax, eax
cmp dword [esi + 0x10c], 0x79
jge 0x521057
jmp 0x521096
mov dword [esi], 0xe
xor eax, eax
inc eax
mov dword [ebp - 0x2c], eax
xor ebx, ebx
jmp 0x521216
mov edi, dword [esi + 0x44]
mov ecx, dword [ebp - 0x14]
lea edx, [ecx - 2]
and edx, edi
dec ecx
and ecx, edi
mov edi, dword [esi + 0x60]
movzx edx, byte [edi + edx]
movzx edi, byte [edi + ecx]
mov ecx, dword [esi + 0x6c]
mov dl, byte [ecx + edx + 0x100]
or dl, byte [ecx + edi]
movzx ecx, dl
mov edx, dword [ebp - 0x24]
mov cl, byte [edx + ecx + 0x80]
jmp 0x520f93
mov eax, dword [eax + 4]
mov dword [ebp - 0x3c], eax
jmp 0x520880
mov ecx, esi
call fcn.004c02d0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
cmp ecx, 0x18
jb 0x5215cf
mov esi, dword [ebp - 0x20]
mov edx, dword [esi + 0x10]
mov edi, dword [edx]
shrd eax, edi, 0x18
mov dword [esi + 8], eax
xor ecx, 0x18
mov dword [esi + 0xc], ecx
add dword [esi + 0x14], 0xfffffffd
add edx, 3
mov dword [esi + 0x10], edx
shr eax, cl
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0xb0], 0
je 0x5215f9
mov esi, dword [ebp - 0x20]
mov ecx, dword [esi + 0x100]
movzx eax, al
mov bl, byte [ecx + eax*4]
mov dword [ebp - 0x18], ecx
movzx edx, word [ecx + eax*4 + 2]
jmp 0x52113c
mov ebx, dword [ebp - 0x10]
neg ebx
xor eax, eax
mov esi, dword [ebp - 0x20]
jmp 0x52117c
mov edx, dword [esi + 0x10]
mov edi, dword [edx]
shrd eax, edi, 0x18
mov dword [esi + 8], eax
xor ecx, 0x18
mov dword [esi + 0xc], ecx
add dword [esi + 0x14], 0xfffffffd
add edx, 3
mov dword [esi + 0x10], edx
jmp 0x5210b3
mov eax, dword [esi + 0x10]
mov edi, dword [eax]
shrd edx, edi, 0x18
mov dword [esi + 8], edx
mov ebx, dword [ebp - 0x18]
add ebx, 0xfffffffd
mov dword [ebp - 0x18], ebx
mov dword [esi + 0x14], ebx
add eax, 3
mov dword [esi + 0x10], eax
xor ecx, 0x18
jmp 0x5212db