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

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x1c], 0
or edx, 0xffffffff
mov esi, edi
or ebp, edx
mov dword [esp + 0x18], edx
or ecx, edx
mov dword [esp + 0x14], ebp
cmp dword [edi + 0xe910], 0
mov dword [esp + 0x34], ecx
jbe 0x49a74b
jmp 0x499cd0
movzx eax, byte [esi + 0xfa]
movzx edx, byte [esi + 0xf7]
movzx ecx, byte [esi + 0xf8]
movzx ebp, byte [esi + 0xf9]
movzx ebx, byte [esi + 0xfb]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x30], eax
cmp eax, 4
je 0x499d17
cmp eax, 6
je 0x499d17
mov byte [esp + 0x13], 0
cmp ecx, 0xb
jne 0x499d1c
mov byte [esp + 0x13], 1
and dword [esi + 0x24], 0xfeffffff
mov dword [esp + 0x20], 0
cmp eax, 0x13
je 0x499d39
cmp eax, 0x14
jne 0x499dc3
test ebx, ebx
jne 0x499d4f
test byte [edi + 0xe920], 0x22
je 0x499d4f
movzx ebx, byte [esi + 0xe9]
jmp 0x499d55
mov byte [esi + 0xe9], bl
mov eax, ebx
and eax, 0xf0
cmp eax, 0xd0
jne 0x499d6e
mov eax, ebx
and eax, 0xf
mov dword [esp + 0x20], eax
jmp 0x499dc7
cmp dword [edi + 0xe92c], 0
jne 0x499dc3
cmp eax, 0x60
jne 0x499d83
cmp dword [esp + 0x30], 0x13
je 0x499d91
cmp eax, 0xb0
jne 0x499db1
cmp dword [esp + 0x30], 0x14
jne 0x499db1
mov eax, ebx
mov ecx, edi
and eax, 0xf
push eax
push esi
call fcn.00499ad0
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
test eax, eax
js 0x499dc3
mov dword [esp + 0x34], eax
jmp 0x499dc3
cmp eax, 0xe0
jne 0x499dc3
mov eax, ebx
and eax, 0xf
mov dword [edi + 0xe934], eax
mov eax, dword [esp + 0x20]
cmp dword [edi + 0xe92c], eax
jne 0x49a081
movzx ecx, byte [esi + 0xf6]
mov dword [esp + 0x28], ecx
test edx, edx
je 0x499de8
mov byte [esi + 0xd7], dl
test dword [edi + 0xe920], 0x100005
je 0x499e1c
cmp ecx, 0xff
jne 0x499e1c
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x499e10
test byte [eax + 4], 1
jne 0x499ec1
mov dword [esi + 0x74], 0
jmp 0x49a02c
test ecx, ecx
jne 0x499ec1
test edx, edx
je 0x499ec1
cmp dword [edi + 0xe928], ecx
je 0x499e9c
mov eax, dword [esi + 0x90]
test eax, eax
je 0x499e45
movzx eax, word [eax + 0x1e]
mov dword [esi + 0x74], eax
test dword [edi + 0xe920], 0x100004
je 0x499eb4
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 0x499eb4
cmp edx, 0xf0
jae 0x499eb4
mov eax, edx
shl eax, 6
movzx eax, word [eax + edi + 0x821e]
mov dword [esi + 0x74], eax
test byte [edi + 0xe920], 0x20
je 0x49a033
cmp edx, 0xf0
sbb eax, eax
and eax, edx
cmp ecx, 0xfe
sbb edx, edx
and edx, eax
mov dword [esp + 0x24], edx
test ecx, ecx
je 0x499f05
cmp ecx, 0x80
ja 0x499f05
cmp byte [esp + 0x13], 0
mov byte [esi + 0xd6], cl
jne 0x499f05
push 0
push ecx
push edx
push dword [esp + 0x28]
mov ecx, edi
call fcn.00497150
mov edx, dword [esp + 0x24]
test edx, edx
je 0x499f6b
mov eax, dword [esi + 0x90]
mov ecx, edi
push 1
push 1
mov dword [esp + 0x40], eax
movzx eax, byte [esp + 0x1b]
push eax
push edx
push esi
call fcn.00498db0
mov byte [esi + 0xd7], 0
test byte [edi + 0xe920], 0x22
je 0x499f67
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x90]
je 0x499f67
mov eax, dword [esp + 0x28]
test eax, eax
je 0x49a033
mov edx, dword [esp + 0x24]
cmp eax, 0x80
sbb al, al
not al
and al, byte [esp + 0x13]
mov ch, al
mov byte [esp + 0x13], ch
jmp 0x499f6f
mov edx, dword [esp + 0x24]
mov ch, byte [esp + 0x13]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x49a033
test edx, edx
jne 0x499fb9
mov cl, byte [esi + 0xd7]
test cl, cl
je 0x499fb9
cmp eax, 0x80
jae 0x499fb9
mov eax, dword [edi + 0xe920]
and eax, 0x100004
neg eax
sbb eax, eax
inc eax
push eax
push edx
movzx eax, ch
push eax
movzx eax, cl
mov ecx, edi
push eax
push esi
call fcn.00498db0
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 + 0x17]
push eax
mov eax, dword [esp + 0x30]
push eax
push dword [esp + 0x28]
call fcn.004994d0
cmp byte [esp + 0x13], 0
je 0x49a033
test dword [edi + 0xe920], 0x100004
je 0x49a033
cmp dword [esp + 0x24], 0
je 0x49a033
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
or dword [esi + 0x24], 0x1000000
mov ecx, dword [esp + 0x2c]
cmp ecx, 1
jne 0x49a05c
cmp ebp, 0x40
jbe 0x49a046
mov ebp, 0x40
or dword [esi + 0x24], 0x1000000
lea eax, [ebp*4]
mov dword [esi + 0x74], eax
jmp case.0x49a0f2.11
cmp ecx, 2
jne 0x49a084
cmp ebp, 0x40
jbe 0x49a06b
mov ebp, 0x40
or dword [esi + 0x24], 0x1000000
lea eax, [ebp*4]
mov dword [esi + 0x78], eax
jmp case.0x49a0f2.11
cmp ecx, 2
jbe case.0x49a0f2.11
mov edx, dword [esp + 0x20]
cmp dword [edi + 0xe92c], edx
jb case.0x49a0f2.11
cmp ecx, 0xb
jne 0x49a0cf
test byte [edi + 0xe920], 0x20
mov ecx, edi
je 0x49a0c0
and ebp, 0xf
movzx eax, byte [ebp + 0x5442d8]
push eax
push esi
call fcn.0049af40
jmp case.0x49a0f2.11
shl ebp, 4
push ebp
push esi
call fcn.0049af40
jmp case.0x49a0f2.11
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x49a0df
mov byte [esi + 0xea], al
jmp 0x49a0e6
movzx eax, byte [esi + 0xea]
add ecx, 0xfffffffd
cmp ecx, 0xa
ja case.0x49a0f2.11
jmp dword [ecx*4 + 0x49a864]
shl eax, 4
push eax
push esi
mov ecx, edi
call fcn.0049b100
jmp case.0x49a0f2.11
test byte [edi + 0xe920], 0x20
je 0x49a12c
cmp dword [edi + 0xe92c], edx
jne case.0x49a0f2.11
shl eax, 4
mov ecx, edi
or eax, 0xf
push eax
push esi
call fcn.0049b100
jmp case.0x49a0f2.11
push eax
push esi
mov ecx, edi
call fcn.00497fb0
jmp case.0x49a0f2.11
test byte [edi + 0xe920], 0x20
je 0x49a158
cmp dword [edi + 0xe92c], edx
jne case.0x49a0f2.11
or eax, 0xf0
mov ecx, edi
push eax
push esi
call fcn.0049b100
jmp case.0x49a0f2.11
push eax
push esi
mov ecx, edi
call fcn.00497f60
jmp case.0x49a0f2.11
shl eax, 4
push eax
push esi
mov ecx, edi
call fcn.0049b0c0
jmp case.0x49a0f2.11
shl eax, 4
push eax
push esi
mov ecx, edi
call fcn.004999f0
jmp case.0x49a0f2.11
shl eax, 2
mov ecx, edi
push eax
push esi
call fcn.00499bf0
jmp case.0x49a0f2.11
shl eax, 2
mov ecx, edi
push eax
push esi
call fcn.00499b50
mov eax, dword [esp + 0x30]
test eax, eax
je case.0x49a5f8.17
dec eax
cmp eax, 0x1e
ja case.0x49a5f8.17
jmp dword [eax*4 + 0x49a890]
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
cmp ebx, 0x40
jae 0x49a1da
shl ebx, 2
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0x74], ebx
jmp case.0x49a5f8.17
or dword [esi + 0x24], 0x1000000
mov ebx, 0x100
mov dword [esi + 0x74], ebx
jmp case.0x49a5f8.17
test ebx, ebx
jne 0x49a1ff
test byte [edi + 0xe920], 1
jne case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.00499bf0
jmp case.0x49a5f8.17
test ebx, ebx
jne 0x49a21e
test byte [edi + 0xe920], 1
jne case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.00499b50
jmp case.0x49a5f8.17
test ebx, ebx
jne 0x49a23d
cmp dword [edi + 0xe920], 1
je case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.0049b100
jmp case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.0049af40
jmp case.0x49a5f8.17
test ebx, ebx
jne 0x49a266
cmp dword [edi + 0xe920], 1
je 0x49a26f
push ebx
push esi
mov ecx, edi
call fcn.0049b100
push 0
push esi
mov ecx, edi
call fcn.0049af40
jmp case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.0049b0c0
jmp case.0x49a5f8.17
test ebx, ebx
jne 0x49a299
cmp dword [edi + 0xe920], 1
je 0x49a2a2
push ebx
push esi
mov ecx, edi
call fcn.0049b100
or dword [esi + 0x24], 0x10000
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
push ebx
mov ecx, edi
call fcn.0049ae50
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
test byte [edi + 0xe920], 0x22
je 0x49a2fc
test ebx, ebx
je 0x49a2f5
push ebx
mov ecx, edi
mov byte [esi + 0xeb], bl
call fcn.0049aee0
jmp case.0x49a5f8.17
movzx ebx, byte [esi + 0xeb]
push ebx
mov ecx, edi
call fcn.0049aee0
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
test ebx, ebx
je 0x49a322
mov byte [esi + 0xec], bl
jmp 0x49a329
movzx ebx, byte [esi + 0xec]
movzx eax, byte [esi + 0xed]
mov cl, byte [esi + 0xf6]
shl eax, 8
or eax, ebx
shl eax, 8
test cl, cl
je 0x49a3a1
cmp cl, 0x80
jae 0x49a3a1
cmp byte [esp + 0x13], 0
je 0x49a353
mov dword [esi + 4], eax
jmp 0x49a356
add dword [esi + 4], eax
mov ecx, dword [esi + 0x20]
cmp dword [esi + 4], ecx
jb case.0x49a5f8.17
test dword [edi + 0xe920], 0x100004
jne case.0x49a5f8.17
mov eax, dword [esi + 0x28]
mov dword [esi + 4], eax
test byte [edi + 0xe90c], 4
je case.0x49a5f8.17
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
cmp ecx, 4
jbe 0x49a72c
lea eax, [ecx - 2]
mov dword [esi + 4], eax
jmp 0x49a72c
cmp eax, dword [esi + 0x20]
jae case.0x49a5f8.17
test dword [edi + 0xe920], 0x20010
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
je 0x49a72c
mov dword [esi + 4], eax
jmp 0x49a72c
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
cmp dword [esi + 0x80], 0
je case.0x49a5f8.17
cmp byte [esi + 0xd4], 0
je case.0x49a5f8.17
test ebx, ebx
jne 0x49a402
test byte [edi + 0xe920], 0x22
je case.0x49a5f8.17
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov byte [esi + 0xd8], 1
test ebx, ebx
je 0x49a72c
mov byte [esi + 0xd9], bl
jmp 0x49a72c
test dword [edi + 0xe920], 0x100004
je 0x49a45a
test bl, 0xf0
jne 0x49a443
movzx eax, byte [esi + 0xf1]
and eax, 0xf0
or ebx, eax
test bl, 0xf
jne 0x49a454
movzx eax, byte [esi + 0xf1]
and eax, 0xf
or ebx, eax
or ebx, 0x100
test ebx, ebx
je 0x49a475
push ebx
push dword [esp + 0x20]
mov ecx, edi
mov byte [esi + 0xf1], bl
call fcn.0049ac60
jmp case.0x49a5f8.17
movzx ebx, byte [esi + 0xf1]
mov ecx, edi
push ebx
push dword [esp + 0x20]
call fcn.0049ac60
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov byte [esi + 0xd8], 0x12
test ebx, ebx
je 0x49a72c
mov byte [esi + 0xf3], bl
jmp 0x49a72c
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
cmp dword [edi + 0xe920], 0x20
je 0x49a4d4
add ebx, ebx
cmp ebx, 0x80
jbe 0x49a4e1
mov ebx, pe_nt_image_headers32
lea eax, [ebx + ebx]
mov dword [edi + 0xe960], eax
jmp case.0x49a5f8.17
push ebx
mov ecx, edi
call fcn.00498d00
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
test dword [edi + 0xe90c], 0x4000
jne 0x49a51c
and dword [esi + 0x24], 0xfffff7ff
test dword [edi + 0xe920], 0x100024
je 0x49a537
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0x78], ebx
jmp case.0x49a5f8.17
cmp ebx, 0x80
ja 0x49a551
or dword [esi + 0x24], 0x1000000
lea eax, [ebx + ebx]
mov dword [esi + 0x78], eax
jmp case.0x49a5f8.17
cmp ebx, 0xa4
jne 0x49a567
or dword [esi + 0x24], 0x800
mov dword [esi + 0x78], pe_nt_image_headers32
or dword [esi + 0x24], 0x1000000
jmp case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.004999f0
jmp case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.0049b080
jmp case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.00497f20
jmp case.0x49a5f8.17
push ebx
push dword [esp + 0x20]
mov ecx, edi
call fcn.00497660
jmp case.0x49a5f8.17
push ebx
push dword [esp + 0x20]
mov ecx, edi
call fcn.00497900
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
push dword [esp + 0x1c]
mov ecx, edi
call fcn.00499400
jmp case.0x49a5f8.17
mov eax, ebx
and eax, 0xf0
add eax, 0xfffffff0
cmp eax, 0x90
ja case.0x49a5f8.17
movzx eax, byte [eax + 0x49a91c]
jmp dword [eax*4 + 0x49a90c]
and ebx, 0xf
mov ecx, edi
push ebx
push esi
call fcn.00497d50
jmp case.0x49a5f8.17
and ebx, 0xf
mov ecx, edi
push ebx
push esi
call fcn.00497cc0
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
cmp ebx, 0x40
ja 0x49a72c
or dword [esi + 0x24], 0x1000000
mov dword [esi + 0xa8], ebx
jmp 0x49a72c
push ebx
push esi
mov ecx, edi
call fcn.004970a0
jmp case.0x49a5f8.17
push ebx
push esi
mov ecx, edi
call fcn.004999b0
jmp case.0x49a5f8.17
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
mov edx, dword [esi + 0x8c]
mov dword [esi + 0x94], ebx
mov dword [esi + 0x98], ebx
mov dword [esi + 0x9c], ebx
test edx, edx
je case.0x49a5f8.17
mov ecx, dword [esi + 0x24]
test ecx, 0x400000
je case.0x49a5f8.17
mov al, byte [edx + 0x22d]
test al, al
je case.0x49a5f8.17
mov ebp, dword [esp + 0x14]
movzx eax, al
movzx eax, word [edx + eax*2 + 0x4a]
mov edx, dword [esp + 0x18]
cmp ebx, eax
jbe 0x49a72c
and ecx, 0xffbfffff
mov dword [esi + 0x24], ecx
jmp 0x49a72c
mov ebp, ebx
mov dword [esp + 0x14], ebp
jmp 0x49a728
mov ebp, dword [esp + 0x14]
mov edx, ebx
mov dword [esp + 0x18], edx
jmp 0x49a72c
cmp dword [edi + 0xe92c], 0
jne case.0x49a5f8.17
mov ecx, edi
cmp ebx, 0x80
jae 0x49a70a
movzx eax, byte [esi + 0xfe]
add eax, 0x694
shl eax, 5
push ebx
add eax, edi
push eax
jmp 0x49a71b
and ebx, 0x7f
add ebx, 0x6a4
shl ebx, 5
push 0
add ebx, edi
push ebx
push dword [esp + 0x24]
call fcn.0049a9b0
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add esi, 0x100
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [edi + 0xe910]
jb 0x499cd0
mov ecx, dword [esp + 0x34]
cmp dword [edi + 0xe92c], 0
jne 0x49a83e
test ecx, ecx
js 0x49a791
cmp dword [edi + 0xe934], 0
mov eax, dword [edi + 0xe950]
mov dword [edi + 0xe954], eax
mov dword [edi + 0xe944], ecx
je 0x49a83e
lea eax, [ecx + 1]
mov dword [edi + 0xe944], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
test edx, edx
jns 0x49a7a6
test ebp, ebp
jns 0x49a7b1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x30
ret
test ebp, ebp
jns 0x49a7b1
mov ebp, dword [edi + 0xe950]
inc ebp
mov esi, dword [edi + 0xe950]
xor ebx, ebx
test edx, edx
sets bl
dec ebx
and ebx, edx
cmp ebp, esi
jl 0x49a7cf
jne 0x49a7f6
cmp ebx, dword [edi + 0xe948]
jg 0x49a7f6
push ebx
push ebp
push dword [edi + 0xe948]
mov ecx, edi
push esi
call fcn.00499230
test eax, eax
jne 0x49a7f6
mov eax, dword [edi + 0xe97c]
test eax, eax
je 0x49a84b
jle 0x49a7f6
dec eax
mov dword [edi + 0xe97c], eax
cmp ebp, 0x100
jge 0x49a83e
cmp ebp, esi
jne 0x49a80e
cmp ebx, dword [edi + 0xe948]
je 0x49a83e
cmp ebp, esi
je 0x49a832
xor eax, eax
cmp dword [edi + 0xe910], eax
jbe 0x49a832
lea ecx, [edi + 0xf5]
mov edi, edi
mov byte [ecx], 0
lea ecx, [ecx + 0x100]
inc eax
cmp eax, dword [edi + 0xe910]
jb 0x49a820
mov dword [edi + 0xe954], ebp
mov dword [edi + 0xe944], ebx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x30
ret
mov eax, dword [edi + 0xe980]
mov dword [edi + 0xe97c], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov eax, dword [ecx + 0xe934]
inc dword [ecx + 0xe92c]
inc eax
imul eax, dword [ecx + 0xe93c]
push ebx
push esi
push edi
add eax, dword [ecx + 0xe938]
cmp dword [ecx + 0xe92c], eax
jb 0x49c036
mov eax, dword [ecx + 0xe954]
mov edx, dword [ecx + 0xe944]
mov dword [ecx + 0xe934], 0
mov dword [ecx + 0xe938], 0
mov dword [ecx + 0xe92c], 0
mov dword [ecx + 0xe948], edx
cmp dword [ecx + 0xe950], eax
je 0x49be57
mov dword [ecx + 0xe950], eax
mov ebx, dword [ecx + 0xe90c]
and ebx, 0x20
jne 0x49bf25
mov eax, dword [ecx + 0xe950]
cmp eax, 0x100
jae 0x49be7d
movzx eax, byte [eax + ecx + 0xd060]
jmp 0x49be82
mov eax, 0xff
mov dword [ecx + 0xe94c], eax
cmp eax, 0xf0
jae 0x49bea3
cmp dword [ecx + eax*4 + 0xcac0], 0
jne 0x49bea3
mov dword [ecx + 0xe94c], 0xfe
mov eax, dword [ecx + 0xe94c]
cmp eax, 0xf0
jb 0x49bf19
cmp eax, 0xff
je 0x49c0a8
mov eax, dword [ecx + 0xe950]
cmp eax, 0x100
jae 0x49c0a8
inc eax
mov dword [ecx + 0xe950], eax
cmp eax, 0x100
jae 0x49bee4
movzx eax, byte [eax + ecx + 0xd060]
jmp 0x49bee9
mov eax, 0xff
mov dword [ecx + 0xe94c], eax
cmp eax, 0xf0
jae 0x49beb0
cmp dword [ecx + eax*4 + 0xcac0], 0
jne 0x49bf12
mov dword [ecx + 0xe94c], 0xfe
mov eax, dword [ecx + 0xe94c]
jmp 0x49beb0
cmp eax, 0xf0
jae 0x49beb0
mov eax, dword [ecx + 0xe950]
mov dword [ecx + 0xe954], eax
mov eax, dword [ecx + 0xe94c]
cmp eax, 0xf0
jae 0x49c0a8
cmp dword [ecx + eax*4 + 0xcac0], 0
lea edi, [ecx + eax*4]
je 0x49c0a8
lea esi, [ecx + eax*2]
movzx eax, word [esi + 0xce80]
cmp edx, eax
jb 0x49bf5f
mov dword [ecx + 0xe948], 0
mov edx, dword [ecx + 0xe948]
inc edx
mov dword [ecx + 0xe944], edx
movzx eax, word [esi + 0xce80]
cmp edx, eax
jb 0x49bf92
test ebx, ebx
jne 0x49bf88
mov eax, dword [ecx + 0xe950]
inc eax
mov dword [ecx + 0xe954], eax
mov dword [ecx + 0xe944], 0
mov esi, dword [ecx + 0xe910]
xor ebx, ebx
mov eax, dword [ecx + 0xe948]
imul eax, esi
lea edx, [eax + eax*2]
mov eax, dword [edi + 0xcac0]
lea edi, [eax + edx*2]
test esi, esi
je 0x49c036
lea edx, [ecx + 0xf7]
lea ecx, [ecx]
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 0x49bfc0
cmp dword [ecx + 0xe93c], 0
jne 0x49c049
mov dword [ecx + 0xe93c], 1
or dword [ecx + 0xe90c], 0x1000
mov eax, dword [ecx + 0xe92c]
mov esi, dword [ecx + 0xe90c]
test eax, eax
je 0x49c0a0
and esi, 0xffffefff
test byte [ecx + 0xe920], 4
mov dword [ecx + 0xe90c], esi
jne 0x49c0a0
mov edx, dword [ecx + 0xe934]
mov edi, dword [ecx + 0xe93c]
inc edx
imul edx, edi
cmp eax, edx
jae 0x49c0a0
xor edx, edx
div edi
test edx, edx
jne 0x49c0a0
or esi, 0x1000
mov dword [ecx + 0xe90c], esi
pop edi
pop esi
pop ebx
jmp 0x499c90
pop edi
pop esi
xor eax, eax
pop ebx
ret