Function at 0x5114a0
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x138
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x24], 0
or ebx, 0xffffffff
mov esi, edi
or edx, ebx
mov dword [esp + 0x10], ebx
or ecx, ebx
mov dword [esp + 0x14], edx
cmp dword [edi + 0xe910], 0
lea eax, [edi + 0xe92c]
mov dword [esp + 0x2c], ecx
jbe 0x50c9dd
nop dword [eax]
mov al, byte [esi + 0xf7]
mov dword [esp + 0x3c], ecx
mov cl, byte [esi + 0xf9]
movzx edx, cl
mov byte [esp + 0x33], cl
movzx ecx, byte [esi + 0xfa]
movzx ebp, al
mov dword [esp + 0x20], ecx
cmp dword [esp + 0x20], 4
mov cl, byte [esi + 0xfb]
mov byte [esp + 0x32], al
movzx eax, byte [esi + 0xf8]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], edx
movzx ebx, cl
je 0x50c2dd
cmp dword [esp + 0x20], 6
je 0x50c2dd
mov byte [esp + 0x1b], 0
cmp eax, 0xb
jne 0x50c2e2
mov byte [esp + 0x1b], 1
and dword [esi + 0x24], 0xfeffffff
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], 0
cmp eax, 0x13
je 0x50c303
cmp eax, 0x14
jne 0x50c421
test cl, cl
jne 0x50c319
test byte [edi + 0xe920], 0x22
je 0x50c319
movzx ebx, byte [esi + 0xe9]
jmp 0x50c31f
mov byte [esi + 0xe9], cl
mov eax, ebx
and eax, 0xf0
cmp eax, 0xd0
jne 0x50c33b
mov eax, ebx
and eax, 0xf
mov dword [esp + 0x28], eax
jmp 0x50c425
cmp dword [edi + 0xe92c], 0
jne 0x50c421
cmp eax, 0x60
jne 0x50c359
cmp dword [esp + 0x20], 0x13
je 0x50c36f
jmp 0x50c421
cmp eax, 0xb0
jne 0x50c40f
cmp dword [esp + 0x20], 0x14
jne 0x50c421
mov eax, ebx
and eax, 0xf
mov dword [esp + 0x2c], eax
je 0x50c3ed
mov al, byte [esi + 0xf5]
test al, al
je 0x50c390
sub al, 1
mov byte [esi + 0xf5], al
jne 0x50c3c1
jmp 0x50c3f9
mov ebp, dword [edi + 0xe910]
xor ecx, ecx
mov eax, edi
test ebp, ebp
je 0x50c3b7
nop
cmp eax, esi
je 0x50c3ad
cmp byte [eax + 0xf5], 0
jne 0x50c3d9
inc ecx
add eax, 0x100
cmp ecx, ebp
jb 0x50c3a0
mov eax, dword [esp + 0x2c]
mov byte [esi + 0xf5], al
movzx eax, byte [esi + 0xf4]
mov ebp, dword [esp + 0x1c]
test eax, eax
cmovs eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
jmp 0x50c421
mov ebp, dword [esp + 0x1c]
or eax, 0xffffffff
test eax, eax
cmovs eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
jmp 0x50c421
mov al, byte [edi + 0xe948]
mov byte [esi + 0xf4], al
mov ebp, dword [esp + 0x1c]
mov eax, 0xffffffff
test eax, eax
cmovs eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
jmp 0x50c421
cmp eax, 0xe0
jne 0x50c421
mov eax, ebx
and eax, 0xf
mov dword [edi + 0xe934], eax
mov eax, dword [esp + 0x28]
cmp dword [edi + 0xe92c], eax
jne 0x50c71b
movzx ecx, byte [esi + 0xf6]
mov dword [esp + 0x3c], ecx
test ebp, ebp
je 0x50c44a
mov al, byte [esp + 0x32]
mov byte [esi + 0xd7], al
test dword [edi + 0xe920], 0x100005
je 0x50c481
cmp ecx, 0xff
jne 0x50c481
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x50c46e
test byte [eax + 4], 1
jne 0x50c481
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0x74], 0
jmp 0x50c6cb
mov eax, dword [esp + 0x1c]
mov ebp, ecx
mov edx, eax
test ecx, ecx
jne 0x50c542
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], ecx
test edx, edx
je 0x50c542
cmp dword [edi + 0xe928], ecx
je 0x50c511
mov eax, dword [esi + 0x90]
test eax, eax
je 0x50c4ba
movzx eax, word [eax + 0x1e]
mov dword [esi + 0x74], eax
test dword [edi + 0xe920], 0x100004
je 0x50c529
mov eax, dword [esi + 0x24]
and eax, 0xfffffbff
mov dword [esi + 0x94], 0
or eax, 0x1000000
mov dword [esi + 0x98], 0
mov dword [esi + 0x9c], 0
mov dword [esi + 0xbc], 0
mov dword [esi + 0xc0], 0
mov dword [esi + 0x24], eax
mov dword [esi + 0x7c], 0x10000
jmp 0x50c529
cmp edx, 0xf0
jae 0x50c529
mov eax, edx
shl eax, 6
movzx eax, word [eax + edi + 0x821e]
mov dword [esi + 0x74], eax
test byte [edi + 0xe920], 0x20
mov eax, edx
mov ecx, ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], ecx
je 0x50c6c7
cmp eax, 0xf0
mov ebp, ecx
mov dword [esp + 0x44], ebp
sbb eax, eax
and eax, dword [esp + 0x1c]
cmp ecx, 0xfe
sbb edx, edx
and edx, eax
mov dword [esp + 0x1c], edx
mov eax, edx
mov dword [esp + 0x38], eax
test ecx, ecx
je 0x50c5a4
cmp ecx, 0x80
ja 0x50c59e
mov byte [esi + 0xd6], cl
mov cl, byte [esp + 0x1b]
mov dword [esp + 0x1c], edx
test cl, cl
jne 0x50c5ac
push 0
push ebp
push eax
push dword [esp + 0x30]
mov ecx, edi
call fcn.0050d5e0
mov edx, dword [esp + 0x38]
mov dword [esp + 0x1c], edx
jmp 0x50c5a8
mov dword [esp + 0x1c], eax
jmp 0x50c5a8
mov ebp, dword [esp + 0x3c]
mov cl, byte [esp + 0x1b]
test edx, edx
je 0x50c602
mov eax, dword [esi + 0x90]
push 1
push 1
mov dword [esp + 0x40], eax
movzx eax, cl
mov ecx, edi
push eax
push edx
push esi
call fcn.0050dde0
mov byte [esi + 0xd7], 0
test byte [edi + 0xe920], 0x22
je 0x50c5fe
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x90]
je 0x50c5fe
test ebp, ebp
je 0x50c6c7
cmp ebp, 0x80
jae 0x50c64b
mov byte [esp + 0x1b], 0
jmp 0x50c64b
mov edx, dword [esp + 0x1c]
test ebp, ebp
je 0x50c6c7
test edx, edx
jne 0x50c64b
mov cl, byte [esi + 0xd7]
test cl, cl
je 0x50c64b
cmp ebp, 0x80
jae 0x50c64b
mov eax, dword [edi + 0xe920]
and eax, 0x100004
neg eax
sbb eax, eax
inc eax
push eax
movzx eax, byte [esp + 0x1f]
push edx
push eax
movzx eax, cl
mov ecx, edi
push eax
push esi
call fcn.0050dde0
mov byte [esi + 0xd7], 0
mov eax, dword [edi + 0xe920]
mov ecx, edi
and eax, 0x100004
neg eax
sbb eax, eax
inc eax
push eax
movzx eax, byte [esp + 0x1f]
push eax
push ebp
push dword [esp + 0x30]
call fcn.0050d930
cmp byte [esp + 0x1b], 0
je 0x50c6c7
test dword [edi + 0xe920], 0x100004
je 0x50c6c7
cmp dword [esp + 0x1c], 0
mov edx, dword [esp + 0x34]
je 0x50c6cb
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0x94], 0
mov dword [esi + 0x98], 0
mov dword [esi + 0x9c], 0
mov dword [esi + 0xbc], 0
mov dword [esi + 0xc0], 0
jmp 0x50c6cb
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x40]
cmp eax, 1
jne 0x50c6f5
cmp edx, 0x40
mov eax, 0x40
cmova edx, eax
or dword [esi + 0x24], 0x1000000
lea eax, [edx*4]
mov dword [esi + 0x74], eax
jmp case.0x50c792.11
cmp eax, 2
jne 0x50c722
cmp edx, 0x40
mov eax, 0x40
cmova edx, eax
or dword [esi + 0x24], 0x1000000
lea eax, [edx*4]
mov dword [esi + 0x78], eax
jmp case.0x50c792.11
mov eax, dword [esp + 0x40]
cmp eax, 2
jbe case.0x50c792.11
mov ebp, dword [esp + 0x28]
cmp dword [edi + 0xe92c], ebp
jb case.0x50c792.11
cmp eax, 0xb
jne 0x50c76f
test byte [edi + 0xe920], 0x20
je 0x50c75e
and edx, 0xf
mov ecx, edi
movzx edx, byte [edx + 0x56b260]
push edx
push esi
call fcn.0050e4b0
jmp case.0x50c792.11
shl edx, 4
mov ecx, edi
push edx
push esi
call fcn.0050e4b0
jmp case.0x50c792.11
test edx, edx
je 0x50c77f
mov cl, byte [esp + 0x33]
mov byte [esi + 0xea], cl
jmp 0x50c786
movzx edx, byte [esi + 0xea]
add eax, 0xfffffffd
cmp eax, 0xa
ja case.0x50c792.11
jmp dword [eax*4 + 0x50d3d0]
shl edx, 4
push edx
push esi
mov ecx, edi
call fcn.0050e5e0
jmp case.0x50c792.11
test byte [edi + 0xe920], 0x20
je 0x50c7d3
cmp dword [edi + 0xe92c], ebp
jne case.0x50c792.11
shl edx, 4
mov ecx, edi
or edx, 0xf
push edx
push esi
call fcn.0050e5e0
jmp case.0x50c792.11
test edx, edx
je 0x50c7df
mov byte [esi + 0xdb], dl
jmp 0x50c7e6
movzx edx, byte [esi + 0xdb]
test dword [edi + 0xe90c], 0x1000
je case.0x50c792.11
mov eax, dword [esi + 0x74]
mov ecx, 0x100
lea eax, [eax + edx*4]
cmp eax, 0x100
cmovg eax, ecx
mov dword [esi + 0x74], eax
test byte [edi + 0xe920], 1
je case.0x50c792.11
or dword [esi + 0x24], 0x1000000
jmp case.0x50c792.11
test byte [edi + 0xe920], 0x20
je 0x50c84e
cmp dword [edi + 0xe92c], ebp
jne case.0x50c792.11
or edx, 0xf0
mov ecx, edi
push edx
push esi
call fcn.0050e5e0
jmp case.0x50c792.11
test edx, edx
je 0x50c85a
mov byte [esi + 0xdb], dl
jmp 0x50c861
movzx edx, byte [esi + 0xdb]
test dword [edi + 0xe90c], 0x1000
je case.0x50c792.11
mov ecx, dword [esi + 0x74]
lea eax, [edx*4]
sub ecx, eax
mov eax, 0
cmovs ecx, eax
mov dword [esi + 0x74], ecx
test byte [edi + 0xe920], 1
je case.0x50c792.11
or dword [esi + 0x24], 0x1000000
jmp case.0x50c792.11
mov eax, edx
shl eax, 4
test al, 0xf0
je 0x50c8ac
and dl, 0xf
mov byte [esi + 0xe1], dl
or dword [esi + 0x24], 0x10000
jmp case.0x50c792.11
test dl, 0xf
je 0x50c8c7
mov al, dl
and al, 0xf
shl al, 2
mov byte [esi + 0xe2], al
test dl, 0xf0
je 0x50c8d5
shr edx, 4
mov byte [esi + 0xe1], dl
or dword [esi + 0x24], 0x10000
jmp case.0x50c792.11
shl edx, 4
push edx
push esi
mov ecx, edi
call fcn.0050e6e0
jmp case.0x50c792.11
lea eax, [edx*4]
mov ecx, edi
push eax
push esi
call fcn.0050e150
jmp case.0x50c792.11
lea eax, [edx*4]
mov ecx, edi
push eax
push esi
call fcn.0050e1e0
mov eax, dword [esp + 0x20]
test eax, eax
je case.0x50cf5f.17
dec eax
cmp eax, 0x1e
ja case.0x50cf5f.17
jmp dword [eax*4 + 0x50d3fc]
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
cmp ebx, 0x40
jae 0x50c94e
shl ebx, 2
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0x74], ebx
jmp 0x50c9b6
or dword [esi + 0x24], 0x1000000
mov ebx, 0x100
mov dword [esi + 0x74], ebx
jmp 0x50c9b6
test ebx, ebx
jne 0x50c96c
test byte [edi + 0xe920], 1
jne case.0x50cf5f.17
push ebx
push esi
mov ecx, edi
call fcn.0050e150
jmp case.0x50cf5f.17
test ebx, ebx
jne 0x50c984
test byte [edi + 0xe920], 1
jne case.0x50cf5f.17
push ebx
push esi
mov ecx, edi
call fcn.0050e1e0
jmp case.0x50cf5f.17
test ebx, ebx
jne 0x50c99c
cmp dword [edi + 0xe920], 1
je case.0x50cf5f.17
push ebx
push esi
mov ecx, edi
call fcn.0050e5e0
jmp case.0x50cf5f.17
push ebx
push esi
mov ecx, edi
call fcn.0050e4b0
lea eax, [edi + 0xe92c]
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
add esi, 0x100
inc ecx
cmp ecx, dword [edi + 0xe910]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x2c]
jb 0x50c280
cmp dword [eax], 0
jne 0x50d3bf
test ecx, ecx
js 0x50d198
cmp dword [edi + 0xe934], 0
mov eax, dword [edi + 0xe950]
mov dword [edi + 0xe954], eax
mov dword [edi + 0xe944], ecx
je 0x50d3bf
lea eax, [ecx + 1]
mov dword [edi + 0xe944], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret
test ebx, ebx
jne 0x50ca33
cmp dword [edi + 0xe920], 1
je 0x50ca3c
push ebx
push esi
mov ecx, edi
call fcn.0050e5e0
push 0
jmp 0x50c9a8
test bl, 0xf
je 0x50ca55
mov al, bl
and al, 0xf
shl al, 2
mov byte [esi + 0xe2], al
test bl, 0xf0
je 0x50ca63
shr ebx, 4
mov byte [esi + 0xe1], bl
or dword [esi + 0x24], 0x10000
jmp case.0x50cf5f.17
test ebx, ebx
jne 0x50ca7c
cmp dword [edi + 0xe920], 1
je 0x50ca63
push ebx
push esi
mov ecx, edi
call fcn.0050e5e0
or dword [esi + 0x24], 0x10000
jmp case.0x50cf5f.17
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
push ebx
mov ecx, edi
call fcn.0050f680
jmp case.0x50cf5f.17
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
test byte [edi + 0xe920], 0x22
je 0x50cae0
test ebx, ebx
je 0x50cad9
mov byte [esi + 0xeb], bl
jmp 0x50cae0
movzx ebx, byte [esi + 0xeb]
cmp ebx, 0x20
jae 0x50cb50
mov ecx, dword [edi + 0xe940]
mov eax, ebx
mov edx, dword [esp + 0x14]
and eax, 0xf
and bl, 0xf0
add eax, eax
cmp bl, 0x10
mov ebx, dword [esp + 0x10]
jne 0x50cb2a
add eax, ecx
mov dword [edi + 0xe940], eax
cmp eax, 0xff
lea eax, [edi + 0xe92c]
jbe 0x50c9be
mov dword [edi + 0xe940], 0xff
jmp 0x50c9be
sub ecx, eax
lea eax, [edi + 0xe92c]
mov dword [edi + 0xe940], ecx
cmp ecx, 0x20
jge 0x50c9be
mov dword [edi + 0xe940], 0x20
jmp 0x50c9be
mov dword [edi + 0xe940], ebx
jmp 0x50c9b6
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
test ebx, ebx
je 0x50cb7a
mov byte [esi + 0xec], bl
jmp 0x50cb81
movzx ebx, byte [esi + 0xec]
movzx ecx, byte [esi + 0xed]
mov al, byte [esi + 0xf6]
shl ecx, 8
or ecx, ebx
shl ecx, 8
test al, al
je 0x50cbf3
cmp al, 0x80
jae 0x50cbf3
cmp byte [esp + 0x1b], 0
jne 0x50cba8
add ecx, dword [esi + 4]
mov edx, dword [esi + 0x20]
mov dword [esi + 4], ecx
cmp ecx, edx
jb case.0x50cf5f.17
test dword [edi + 0xe920], 0x100004
jne case.0x50cf5f.17
mov eax, dword [esi + 0x28]
mov dword [esi + 4], eax
test byte [edi + 0xe90c], 4
je case.0x50cf5f.17
mov ebx, dword [esp + 0x10]
cmp edx, 4
jbe 0x50cbe8
lea eax, [edx - 2]
mov dword [esi + 4], eax
lea eax, [edi + 0xe92c]
jmp 0x50c9ba
cmp ecx, dword [esi + 0x20]
jae case.0x50cf5f.17
test dword [edi + 0xe920], 0x20010
lea eax, [edi + 0xe92c]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
je 0x50c9be
mov dword [esi + 4], ecx
jmp 0x50c9be
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
cmp dword [esi + 0x80], 0
je 0x50c9b6
cmp byte [esi + 0xd4], 0
je 0x50c9b6
test ebx, ebx
jne 0x50cc60
test byte [edi + 0xe920], 0x22
je 0x50c9b6
mov edx, dword [esp + 0x14]
mov byte [esi + 0xd8], 1
test ebx, ebx
je 0x50cc75
mov byte [esi + 0xd9], bl
mov ebx, dword [esp + 0x10]
jmp 0x50c9be
test dword [edi + 0xe920], 0x100004
je 0x50ccb4
test bl, 0xf0
jne 0x50cc9d
movzx eax, byte [esi + 0xf1]
and eax, 0xf0
or ebx, eax
test bl, 0xf
jne 0x50ccae
movzx eax, byte [esi + 0xf1]
and eax, 0xf
or ebx, eax
or ebx, 0x100
test ebx, ebx
je 0x50cccf
push ebx
push dword [esp + 0x28]
mov ecx, edi
mov byte [esi + 0xf1], bl
call fcn.0050e880
jmp case.0x50cf5f.17
movzx ebx, byte [esi + 0xf1]
mov ecx, edi
push ebx
push dword [esp + 0x28]
call fcn.0050e880
jmp case.0x50cf5f.17
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
mov edx, dword [esp + 0x14]
mov byte [esi + 0xd8], 0x12
test ebx, ebx
je 0x50cc75
mov byte [esi + 0xf3], bl
mov ebx, dword [esp + 0x10]
jmp 0x50c9be
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
cmp dword [edi + 0xe920], 0x20
je 0x50cd3a
add ebx, ebx
cmp ebx, 0x80
mov eax, 0x80
cmova ebx, eax
lea eax, [ebx + ebx]
mov dword [edi + 0xe960], eax
jmp case.0x50cf5f.17
xor edx, edx
test ebx, ebx
je 0x50cd64
mov dword [edi + 0xe970], ebx
jmp 0x50cd6a
mov ebx, dword [edi + 0xe970]
mov ebp, ebx
mov eax, ebx
and ebp, 0xf
and eax, 0xf0
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0xe90c]
setne cl
cmp ebp, 0xf
mov dword [esp + 0x20], eax
sete al
test al, cl
je 0x50cda2
test dword [esp + 0x20], 0x1000
je 0x50cdca
mov edx, ebx
shr edx, 4
jmp 0x50cdc8
and dword [esp + 0x20], 0x1000
cmp dword [esp + 0x40], 0xf0
sete cl
test ebp, ebp
setne al
test al, cl
je 0x50ce11
cmp dword [esp + 0x20], edx
je 0x50cdca
mov edx, ebp
neg edx
add edx, edx
mov ebx, dword [esp + 0x10]
test edx, edx
je 0x50cbe8
cmp dword [edi + 0xe920], 0x20
lea ecx, [edx + edx]
mov eax, dword [edi + 0xe960]
cmove ecx, edx
add eax, ecx
xor ecx, ecx
test eax, eax
cmovns ecx, eax
mov eax, 0x100
cmp ecx, 0x100
cmovg ecx, eax
lea eax, [edi + 0xe92c]
mov dword [edi + 0xe960], ecx
jmp 0x50c9ba
cmp dword [esp + 0x20], edx
jne 0x50cdca
cmp dword [esp + 0x40], edx
je 0x50cdc4
mov edx, ebx
shr edx, 4
and edx, 0xf
jmp 0x50cdc8
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
test dword [edi + 0xe90c], 0x4000
jne 0x50ce4d
and dword [esi + 0x24], 0xfffff7ff
test dword [edi + 0xe920], 0x100024
mov ecx, dword [esi + 0x24]
je 0x50ce6d
or ecx, 0x1000000
mov dword [esi + 0x78], ebx
mov dword [esi + 0x24], ecx
jmp 0x50c9b6
cmp ebx, 0x80
ja 0x50ce8f
lea eax, [ebx + ebx]
or ecx, 0x1000000
mov dword [esi + 0x78], eax
lea eax, [edi + 0xe92c]
mov dword [esi + 0x24], ecx
jmp 0x50c9b6
cmp ebx, 0xa4
jne 0x50cea4
mov dword [esi + 0x78], 0x80
or ecx, 0x800
or ecx, 0x1000000
mov dword [esi + 0x24], ecx
jmp 0x50c9b6
push ebx
push esi
mov ecx, edi
call fcn.0050e6e0
jmp case.0x50cf5f.17
test bl, 0xf
je 0x50ced2
mov al, bl
and al, 0xf
shl al, 2
mov byte [esi + 0xe5], al
test bl, 0xf0
je 0x50cee0
shr ebx, 4
mov byte [esi + 0xe4], bl
or dword [esi + 0x24], 0x20000
jmp case.0x50cf5f.17
test bl, 0xf
je 0x50ca55
mov al, bl
and al, 0xf
jmp 0x50ca4f
push ebx
push dword [esp + 0x28]
mov ecx, edi
call fcn.0050eb80
jmp case.0x50cf5f.17
push ebx
push dword [esp + 0x28]
mov ecx, edi
call fcn.0050ee20
jmp case.0x50cf5f.17
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
push dword [esp + 0x24]
mov ecx, edi
call fcn.0050eaa0
jmp case.0x50cf5f.17
mov eax, ebx
and eax, 0xf0
add eax, 0xfffffff0
cmp eax, 0x90
ja case.0x50cf5f.17
movzx eax, byte [eax + 0x50d488]
jmp dword [eax*4 + 0x50d478]
and ebx, 0xf
mov ecx, edi
push ebx
push esi
call fcn.0050e390
jmp case.0x50cf5f.17
and ebx, 0xf
mov ecx, edi
push ebx
push esi
call fcn.0050e420
jmp case.0x50cf5f.17
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
mov edx, dword [esp + 0x14]
jne 0x50cc75
cmp ebx, 0x40
ja 0x50cc75
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0xa8], ebx
mov ebx, dword [esp + 0x10]
jmp 0x50c9be
test ebx, ebx
je 0x50cfca
mov byte [esi + 0xdf], bl
jmp 0x50cfd1
movzx ebx, byte [esi + 0xdf]
mov ebp, dword [edi + 0xe90c]
mov edx, ebx
and edx, 0xf
mov eax, ebx
and eax, 0xf0
mov dword [esp + 0x38], eax
setne cl
cmp edx, 0xf
sete al
test al, cl
je 0x50d038
test ebp, 0x1000
je case.0x50cf5f.17
shr ebx, 4
mov edx, dword [esp + 0x14]
test ebx, ebx
je 0x50d029
mov eax, dword [esi + 0xa8]
xor ecx, ecx
add eax, ebx
cmovns ecx, eax
mov eax, 0x40
cmp ecx, 0x40
cmovg ecx, eax
mov dword [esi + 0xa8], ecx
mov ebx, dword [esp + 0x10]
lea eax, [edi + 0xe92c]
jmp 0x50c9be
and ebp, 0x1000
cmp dword [esp + 0x38], 0xf0
sete cl
test edx, edx
setne al
test al, cl
je 0x50d060
test ebp, ebp
je case.0x50cf5f.17
mov ebx, edx
neg ebx
jmp 0x50d003
test ebp, ebp
jne case.0x50cf5f.17
test edx, edx
je 0x50d000
mov ebx, edx
neg ebx
jmp 0x50d003
test bl, 0xf
je 0x50d081
mov al, bl
and al, 0xf
mov byte [esi + 0xe8], al
test bl, 0xf0
je 0x50d08f
shr ebx, 4
mov byte [esi + 0xe7], bl
or dword [esi + 0x24], 0x40000
jmp case.0x50cf5f.17
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
mov edx, dword [esi + 0x8c]
mov dword [esi + 0x94], ebx
mov dword [esi + 0x98], ebx
mov dword [esi + 0x9c], ebx
test edx, edx
je 0x50c9b6
mov ecx, dword [esi + 0x24]
test ecx, 0x400000
je 0x50c9b6
mov al, byte [edx + 0x22d]
test al, al
je case.0x50cf5f.17
movzx eax, al
movzx eax, word [edx + eax*2 + 0x4a]
mov edx, dword [esp + 0x14]
cmp ebx, eax
mov ebx, dword [esp + 0x10]
lea eax, [edi + 0xe92c]
jbe 0x50c9be
and ecx, 0xffbfffff
mov dword [esi + 0x24], ecx
jmp 0x50c9be
mov edx, ebx
lea eax, [edi + 0xe92c]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x14], edx
jmp 0x50c9be
mov dword [esp + 0x10], ebx
lea eax, [edi + 0xe92c]
jmp 0x50c9ba
cmp dword [edi + 0xe92c], 0
lea eax, [edi + 0xe92c]
jne 0x50c9b6
mov ecx, edi
cmp ebx, 0x80
jae 0x50d179
movzx eax, byte [esi + 0xfe]
add eax, 0x694
shl eax, 5
push ebx
add eax, edi
push eax
push dword [esp + 0x2c]
call fcn.0050f310
jmp case.0x50cf5f.17
and ebx, 0x7f
add ebx, 0x6a4
shl ebx, 5
push 0
add ebx, edi
push ebx
push dword [esp + 0x2c]
call fcn.0050f310
jmp case.0x50cf5f.17
test ebx, ebx
jns 0x50d1b0
test edx, edx
jns 0x50d1bf
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x138
ret
test edx, edx
jns 0x50d1bf
mov edx, dword [edi + 0xe950]
inc edx
mov dword [esp + 0x14], edx
mov esi, dword [edi + 0xe950]
xor eax, eax
test ebx, ebx
cmovs ebx, eax
mov dword [esp + 0x10], ebx
cmp edx, esi
jl 0x50d1e6
jne 0x50d345
cmp ebx, dword [edi + 0xe948]
jg 0x50d345
mov ecx, dword [edi + 0xe948]
mov eax, edx
cmp edx, 0xf0
jae 0x50d208
cmp byte [edi + eax + 0xd060], 0xfe
jne 0x50d208
inc eax
cmp eax, 0xf0
jb 0x50d1f6
cmp esi, 0xf0
jae 0x50d332
cmp eax, 0xf0
jae 0x50d332
cmp eax, esi
ja 0x50d345
jb 0x50d332
movzx ebp, word [edi + esi*2 + 0xce80]
cmp ebx, ebp
jae 0x50d332
cmp dword [edi + esi*4 + 0xcac0], 0
je 0x50d332
cmp ecx, 0x100
jae 0x50d332
cmp ebx, 0x100
jae 0x50d332
push 0x100
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00490d60
add esp, 0xc
mov eax, 0x100
cmp ebp, 0x100
cmova ebp, eax
mov eax, dword [edi + 0xe948]
mov dword [esp + 0x38], ebp
mov byte [esp + eax + 0x48], 1
cmp byte [esp + ebx + 0x48], 0
jne 0x50d332
cmp ebx, ebp
jae 0x50d345
mov eax, dword [edi + 0xe910]
xor edx, edx
imul eax, ebx
or ebp, 0xffffffff
mov byte [esp + ebx + 0x48], 1
inc ebx
mov dword [esp + 0x2c], 0
lea ecx, [eax + eax*2]
mov eax, dword [edi + esi*4 + 0xcac0]
cmp dword [edi + 0xe910], edx
jbe 0x50d31e
lea eax, [eax + ecx*2]
add eax, 5
nop dword [eax + eax]
mov cl, byte [eax - 2]
cmp cl, 0xc
jne 0x50d2fc
movzx ecx, byte [eax]
cmp ecx, esi
jb 0x50d332
ja 0x50d345
mov ecx, 1
mov dword [esp + 0x2c], ecx
jmp 0x50d308
cmp cl, 0xe
mov ecx, dword [esp + 0x2c]
jne 0x50d308
movzx ebp, byte [eax]
inc edx
add eax, 6
cmp edx, dword [edi + 0xe910]
jb 0x50d2e0
test ebp, ebp
js 0x50d31e
test ecx, ecx
je 0x50d345
mov ebx, ebp
mov ebp, dword [esp + 0x38]
cmp ebx, ebp
jae 0x50d345
cmp ebx, 0x100
jb 0x50d294
mov eax, dword [edi + 0xe97c]
test eax, eax
je 0x50d3b3
jle 0x50d345
dec eax
mov dword [edi + 0xe97c], eax
mov edx, dword [esp + 0x14]
cmp edx, 0x100
jge 0x50d3bf
cmp edx, esi
jne 0x50d371
mov eax, dword [esp + 0x10]
cmp eax, dword [edi + 0xe948]
jne 0x50d397
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x138
ret
xor eax, eax
cmp dword [edi + 0xe910], eax
jbe 0x50d393
lea ecx, [edi + 0xf5]
mov byte [ecx], 0
lea ecx, [ecx + 0x100]
inc eax
cmp eax, dword [edi + 0xe910]
jb 0x50d381
mov eax, dword [esp + 0x10]
mov dword [edi + 0xe944], eax
mov eax, 1
mov dword [edi + 0xe954], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret
mov eax, dword [edi + 0xe980]
mov dword [edi + 0xe97c], eax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x138
ret
push ecx
mov eax, dword [ecx + 0xe934]
mov edx, dword [ecx + 0xe92c]
inc eax
imul eax, dword [ecx + 0xe93c]
inc edx
push ebx
push ebp
push esi
push edi
add eax, dword [ecx + 0xe938]
mov dword [ecx + 0xe92c], edx
cmp edx, eax
jb 0x5116f6
mov esi, dword [ecx + 0xe950]
mov eax, dword [ecx + 0xe954]
mov ebp, dword [ecx + 0xe944]
mov dword [ecx + 0xe934], 0
mov dword [ecx + 0xe938], 0
mov dword [ecx + 0xe92c], 0
mov dword [ecx + 0xe948], ebp
cmp esi, eax
je 0x511510
mov dword [ecx + 0xe950], eax
mov esi, eax
mov eax, dword [ecx + 0xe90c]
and eax, 0x20
mov dword [esp + 0x10], eax
jne 0x5115ea
cmp esi, 0x100
jae 0x511567
movzx eax, byte [esi + ecx + 0xd060]
mov dword [ecx + 0xe94c], eax
mov edi, eax
cmp eax, 0xf0
jae 0x51155d
cmp dword [ecx + eax*4 + 0xcac0], 0
jne 0x51155d
mov dword [ecx + 0xe94c], 0xfe
mov edi, 0xfe
jmp 0x511576
cmp edi, 0xf0
jb 0x5115e4
jmp 0x511576
mov dword [ecx + 0xe94c], 0xff
mov edi, 0xff
mov edx, esi
nop dword [eax + eax]
cmp edi, 0xff
je 0x511778
cmp edx, 0x100
jae 0x511778
lea esi, [edx + 1]
mov dword [ecx + 0xe950], esi
cmp esi, 0x100
jae 0x51176e
movzx eax, byte [esi + ecx + 0xd060]
mov edx, esi
mov dword [ecx + 0xe94c], eax
mov edi, eax
cmp eax, 0xf0
jae 0x5115dc
cmp dword [ecx + eax*4 + 0xcac0], 0
jne 0x5115dc
mov dword [ecx + 0xe94c], 0xfe
jmp 0x51158c
cmp edi, 0xf0
jae 0x511580
mov dword [ecx + 0xe954], esi
mov eax, dword [ecx + 0xe94c]
cmp eax, 0xf0
jae 0x511778
cmp dword [ecx + eax*4 + 0xcac0], 0
lea ebx, [ecx + eax*4]
je 0x511778
lea edi, [ecx + eax*2]
movzx eax, word [edi + 0xce80]
cmp ebp, eax
jb 0x511626
mov dword [ecx + 0xe948], 0
xor ebp, ebp
lea edx, [ebp + 1]
mov dword [ecx + 0xe944], edx
movzx eax, word [edi + 0xce80]
cmp edx, eax
jb 0x511654
cmp dword [esp + 0x10], 0
jne 0x51164a
lea eax, [esi + 1]
mov dword [ecx + 0xe954], eax
mov dword [ecx + 0xe944], 0
mov esi, dword [ecx + 0xe910]
mov eax, esi
imul eax, ebp
lea edx, [eax + eax*2]
mov eax, dword [ebx + 0xcac0]
xor ebx, ebx
lea edi, [eax + edx*2]
test esi, esi
je 0x5116f6
lea edx, [ecx + 0xf7]
nop dword [eax + eax]
movzx eax, byte [edi]
lea edx, [edx + 0x100]
mov byte [edx - 0x101], al
lea edi, [edi + 6]
movzx eax, byte [edi - 5]
inc ebx
mov byte [edx - 0x100], al
movzx eax, byte [edi - 4]
mov byte [edx - 0xff], al
movzx eax, byte [edi - 2]
mov byte [edx - 0xfe], al
movzx eax, byte [edi - 3]
mov byte [edx - 0xfd], al
movzx eax, byte [edi - 1]
and dword [edx - 0x1d3], 0xfff0ffff
mov byte [edx - 0xfc], al
mov eax, dword [edx - 0x18f]
mov dword [edx - 0x1e3], eax
mov eax, dword [edx - 0x193]
mov dword [edx - 0x1e7], eax
mov byte [edx - 0x11f], 0
cmp ebx, dword [ecx + 0xe910]
jb 0x511680
mov edi, dword [ecx + 0xe93c]
test edi, edi
jne 0x51170f
mov dword [ecx + 0xe93c], 1
mov edi, 1
mov esi, dword [ecx + 0xe90c]
mov eax, dword [ecx + 0xe92c]
or esi, 0x1000
mov dword [ecx + 0xe90c], esi
test eax, eax
je 0x511762
and esi, 0xffffefff
test byte [ecx + 0xe920], 4
mov dword [ecx + 0xe90c], esi
jne 0x511762
mov edx, dword [ecx + 0xe934]
inc edx
imul edx, edi
cmp eax, edx
jae 0x511762
xor edx, edx
div edi
test edx, edx
jne 0x511762
or esi, 0x1000
mov dword [ecx + 0xe90c], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 4
jmp 0x50c240
mov dword [ecx + 0xe94c], 0xff
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret