Function at 0x580940
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff68
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x98], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5824ee
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x28], eax
cmp word [ebx + 0x1e], 1
jne 0x58099d
mov eax, dword [ebx + 8]
imul dword [ebp + 0x10]
mov dword [ebp - 0x94], eax
fild dword [ebp - 0x94]
fild dword [ebx + 0xc]
fdiv dword [0x582500]
fmulp st(1)
call fcn.0040308c
mov dword [ebp - 0x38], eax
jmp 0x5809b3
fild dword [ebp + 0x10]
fild dword [ebx + 0xc]
fdiv dword [0x582500]
fmulp st(1)
call fcn.0040308c
mov dword [ebp - 0x38], eax
cmp dword [ebx + 0xc], 4
jne 0x5809bf
test byte [ebp + 0x10], 1
jne 0x5809d8
cmp dword [ebx + 0xc], 1
jne 0x5809db
mov eax, dword [ebp + 0x10]
and eax, 0x80000007
jns 0x5809d4
dec eax
or eax, 0xfffffff8
inc eax
test eax, eax
je 0x5809db
inc dword [ebp - 0x38]
xor eax, eax
mov dword [ebp - 0x44], eax
cmp word [ebx + 0x22], 7
jne 0x580b7d
cmp dword [ebx + 0x6c], 0
jne 0x580b7d
mov dl, 1
mov eax, dword [0x41c770]
call fcn.00403f74
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x4c]
mov esi, dword [eax]
call dword [esi + 0xc]
push 0
push 0
mov eax, dword [ebp - 0x4c]
call fcn.004211f0
mov dl, 1
mov eax, dword [0x62f52c]
call fcn.006369fc
mov dword [ebp - 0x54], eax
push 5
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x54]
mov esi, dword [eax]
call dword [esi + 0x24]
cmp dword [ebx + 0x28], 1
je 0x580a49
cmp dword [ebx + 0x38], 1
jne 0x580a5d
mov eax, dword [ebp + 8]
mov esi, eax
lea edi, [ebp - 0x90]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
jmp 0x580aa5
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x580a8e
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x20]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
xor eax, eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x68], eax
mov byte [ebp - 0x55], 0
mov eax, dword [ebx + 0x178]
mov esi, dword [eax + 0x1c]
mov edi, dword [eax + 0x20]
lea eax, [ebx + 0x178]
push eax
lea eax, [ebp - 0x90]
push eax
push 0
mov al, byte [ebp - 0x55]
push eax
push 0
push 1
push 0
mov ecx, dword [ebp - 0x54]
xor edx, edx
mov eax, dword [ebp - 0x4c]
call fcn.0056a3a8
mov eax, dword [ebx + 0x178]
mov edx, esi
call fcn.00618a0c
mov eax, dword [ebx + 0x178]
mov edx, edi
call fcn.00618a3c
mov eax, dword [ebp - 0x68]
cmp byte [eax], 0
jne 0x580b68
cmp byte [ebp - 0x55], 0
je 0x580b41
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
call dword [edx + 8]
dec eax
test eax, eax
jl 0x580b41
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
call dword [edx + 0xc]
mov edx, eax
mov eax, esi
call fcn.005fd964
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x580b1c
push 0
mov eax, dword [ebp + 0x1c]
mov ecx, 3
cdq
idiv ecx
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x54]
call fcn.0063a518
mov eax, dword [ebp - 0x54]
call fcn.00403fa4
mov eax, dword [ebp - 0x4c]
call fcn.00403fa4
jmp 0x5824c1
cmp word [ebx + 0x22], 7
jne 0x580d2b
cmp dword [ebx + 0x6c], 0
je 0x580d2b
mov dl, 1
mov eax, dword [0x41c770]
call fcn.00403f74
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x4c]
mov esi, dword [eax]
call dword [esi + 0xc]
push 0
push 0
mov eax, dword [ebp - 0x4c]
call fcn.004211f0
mov dl, 1
mov eax, dword [0x41c770]
call fcn.00403f74
mov dword [ebp - 0x50], eax
mov ecx, dword [ebx + 0x70]
mov edx, dword [ebx + 0x6c]
mov eax, dword [ebp - 0x50]
mov esi, dword [eax]
call dword [esi + 0xc]
push 0
push 0
mov eax, dword [ebp - 0x50]
call fcn.004211f0
mov dl, 1
mov eax, dword [0x62f52c]
call fcn.006369fc
mov dword [ebp - 0x54], eax
push 5
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x54]
mov esi, dword [eax]
call dword [esi + 0x24]
cmp dword [ebx + 0x28], 1
je 0x580c0f
cmp dword [ebx + 0x38], 1
jne 0x580c23
mov eax, dword [ebp + 8]
mov esi, eax
lea edi, [ebp - 0x90]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
jmp 0x580c6b
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x580c54
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x20]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
xor eax, eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x68], eax
cmp word [ebx + 0x1c], 2
sete byte [ebp - 0x55]
lea eax, [ebx + 0x178]
push eax
lea eax, [ebp - 0x90]
push eax
push 0
mov al, byte [ebp - 0x55]
push eax
push 0
push 1
push 0
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
call fcn.0056a3a8
mov eax, dword [ebp - 0x68]
cmp byte [eax], 0
jne 0x580d0e
cmp byte [ebp - 0x55], 0
je 0x580ce7
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
call dword [edx + 8]
dec eax
test eax, eax
jl 0x580ce7
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
call dword [edx + 0xc]
mov edx, eax
mov eax, esi
call fcn.005fd964
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x580cc2
push 0
mov eax, dword [ebp + 0x1c]
mov ecx, 3
cdq
idiv ecx
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
xor ecx, ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x54]
call fcn.0063a518
mov eax, dword [ebp - 0x54]
call fcn.00403fa4
mov eax, dword [ebp - 0x4c]
call fcn.00403fa4
mov eax, dword [ebp - 0x50]
call fcn.00403fa4
jmp 0x5824c1
cmp word [ebx + 0x1c], 2
jne 0x580ee6
cmp dword [ebx + 8], 3
je 0x580d46
cmp dword [ebx + 8], 4
jne 0x580ee6
cmp dword [ebx + 0xc], 8
jne 0x580ee6
cmp dword [ebx + 8], 4
jne 0x580d5f
cmp dword [ebx + 0x184], 2
je 0x580d6c
cmp dword [ebx + 8], 4
jne 0x580d75
cmp word [ebx + 0x1c], 2
jne 0x580d75
cmp byte [ebx + 0x180], 0
je 0x580d79
xor eax, eax
jmp 0x580d7b
mov al, 1
mov byte [ebp - 0x45], al
cmp byte [ebp - 0x45], 0
je 0x580d8e
mov eax, dword [ebx + 0x17c]
mov byte [eax + 0x68], 0
cmp word [ebx + 0x22], 1
je 0x580da3
mov eax, dword [ebx + 8]
imul dword [ebp + 0x10]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x580ece
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x580eb7
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
cmp byte [ebp - 0x45], 0
je 0x580e5b
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x580e79
inc edi
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x24]
mov dx, word [eax]
mov word [esi], dx
mov dl, byte [eax + 2]
mov byte [esi + 2], dl
mov edx, esi
lea eax, [esi + 2]
call fcn.005f6c2c
add dword [ebp - 0x24], 3
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
push eax
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov eax, dword [ebx + 0x17c]
mov edx, dword [ebp - 0x10]
call fcn.006320d0
inc dword [ebp - 0x24]
add esi, 3
inc dword [ebp - 0x10]
dec edi
jne 0x580e15
jmp 0x580e79
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
xor edx, edx
mov eax, dword [ebp - 0x24]
call edi
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x580eaa
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x580ece
jmp 0x580ec2
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x580ece
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x580dba
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 2
jne 0x58110a
cmp dword [ebx + 8], 3
je 0x580f01
cmp dword [ebx + 8], 4
jne 0x58110a
cmp dword [ebx + 0xc], 0x10
jne 0x58110a
cmp word [ebx + 0x22], 1
je 0x580f22
mov eax, dword [ebx + 8]
imul dword [ebp + 0x10]
add eax, eax
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x5810f2
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x5810db
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 8
jne 0x581042
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
cdq
idiv dword [ebx + 8]
add eax, eax
lea eax, [eax + eax*2]
add esi, eax
cmp byte [ebx + 0x174], 0
je 0x580feb
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x58109d
inc edi
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
mov word [esi], ax
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
mov word [esi + 2], ax
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
mov word [esi + 4], ax
add dword [ebp - 0x1c], 2
cmp dword [ebx + 8], 4
jne 0x580fe0
add dword [ebp - 0x1c], 2
add esi, 6
dec edi
jne 0x580fad
jmp 0x58109d
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x58109d
inc edi
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
call fcn.0063040c
mov word [esi], ax
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
call fcn.0063040c
mov word [esi + 2], ax
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
mov ax, word [eax]
call fcn.0063040c
mov word [esi + 4], ax
add dword [ebp - 0x1c], 2
cmp dword [ebx + 8], 4
jne 0x58103a
add dword [ebp - 0x1c], 2
add esi, 6
dec edi
jne 0x580ff8
jmp 0x58109d
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
cmp byte [ebx + 0x174], 0
jne 0x58107f
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
mov dl, 7
mov eax, dword [ebp - 0x1c]
call edi
jmp 0x58109d
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
mov dl, 6
mov eax, dword [ebp - 0x1c]
call edi
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x5810ce
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x5810f2
jmp 0x5810e6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x5810f2
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x580f39
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 2
jne 0x581241
cmp dword [ebx + 8], 1
jne 0x581241
cmp dword [ebx + 0xc], 0x10
jne 0x581241
cmp word [ebx + 0x22], 1
je 0x58113e
mov eax, dword [ebx + 8]
imul dword [ebp + 0x10]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x581229
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x581212
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x5811d4
inc edi
mov eax, dword [ebp - 0x24]
movzx edx, word [eax]
shr edx, 0xa
shl edx, 3
mov byte [esi + 2], dl
movzx edx, word [eax]
shr edx, 5
and dl, 0x1f
shl edx, 3
mov byte [esi + 1], dl
mov al, byte [eax]
and al, 0x1f
shl eax, 3
mov byte [esi], al
add dword [ebp - 0x24], 2
add esi, 3
dec edi
jne 0x5811a3
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x581205
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x581229
jmp 0x58121d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x581229
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581155
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 3
jne 0x5813b7
cmp dword [ebx + 0xc], 1
jne 0x5813b7
cmp dword [ebx + 8], 1
jne 0x5813b7
mov eax, dword [ebp + 0x10]
add eax, eax
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x5813aa
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x581393
mov eax, ebx
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x20]
call fcn.0058064c
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 2
jne 0x58130c
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581355
inc edi
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
call fcn.005fbfb4
test eax, eax
je 0x581300
mov byte [esi], 1
jmp 0x581303
mov byte [esi], 0
inc esi
inc dword [ebp - 0x14]
dec edi
jne 0x5812ec
jmp 0x581355
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581355
inc edi
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
call fcn.005fbfb4
test eax, eax
je 0x58133d
mov eax, dword [ebx + 0x44]
mov dx, word [eax + 3]
mov word [esi], dx
mov dl, byte [eax + 5]
mov byte [esi + 2], dl
jmp 0x58134c
mov eax, dword [ebx + 0x44]
mov dx, word [eax]
mov word [esi], dx
mov dl, byte [eax + 2]
mov byte [esi + 2], dl
add esi, 3
inc dword [ebp - 0x14]
dec edi
jne 0x58131c
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x581386
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x5813aa
jmp 0x58139e
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x5813aa
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581284
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 3
jne 0x581650
cmp dword [ebx + 0xc], 8
jg 0x581650
cmp dword [ebx + 8], 2
jne 0x581518
cmp dword [ebx + 0xc], 8
jne 0x581518
cmp word [ebx + 0x22], 1
je 0x5813f4
mov eax, dword [ebp + 0x10]
add eax, eax
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x581500
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x5814e9
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x5814ab
inc edi
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
lea eax, [eax + eax*2]
mov edx, dword [ebx + 0x44]
mov cx, word [edx + eax]
mov word [esi], cx
mov cl, byte [edx + eax + 2]
mov byte [esi + 2], cl
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov edx, 0xff
sub edx, eax
push edx
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov eax, dword [ebx + 0x17c]
mov edx, dword [ebp - 0x14]
call fcn.006320d0
inc dword [ebp - 0x24]
add esi, 3
inc dword [ebp - 0x14]
dec edi
jne 0x581460
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x5814dc
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x581500
jmp 0x5814f4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x581500
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x58140b
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x22], 1
jne 0x581525
cmp dword [ebx + 0xc], 8
jge 0x581530
mov eax, dword [ebp + 0x10]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x581632
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x58161b
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 2
jne 0x5815b1
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x5815dd
inc edi
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi], al
inc dword [ebp - 0x24]
inc esi
dec edi
jne 0x5815a1
jmp 0x5815dd
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x5815dd
inc edi
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
lea eax, [eax + eax*2]
mov edx, dword [ebx + 0x44]
mov cx, word [edx + eax]
mov word [esi], cx
mov cl, byte [edx + eax + 2]
mov byte [esi + 2], cl
inc dword [ebp - 0x24]
add esi, 3
dec edi
jne 0x5815ba
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x58160e
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x581632
jmp 0x581626
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x581632
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581547
cmp word [ebx + 0x22], 1
jne 0x581643
cmp dword [ebx + 0xc], 8
jge 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 1
ja 0x5817e6
cmp dword [ebx + 8], 1
jne 0x5817e6
cmp dword [ebx + 0xc], 8
je 0x581675
cmp dword [ebx + 0xc], 4
jne 0x5817e6
cmp word [ebx + 0x22], 1
jne 0x581682
cmp dword [ebx + 0xc], 4
jne 0x58168d
mov eax, dword [ebp + 0x10]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x5817c8
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x5817b1
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 3
jne 0x58170e
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581773
inc edi
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi], al
inc dword [ebp - 0x24]
inc esi
dec edi
jne 0x5816fe
jmp 0x581773
cmp word [ebx + 0x1c], 0
jne 0x58174a
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581773
inc edi
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov edx, 0xff
sub edx, eax
mov dword [ebp - 0x14], edx
mov al, byte [ebp - 0x14]
mov byte [esi + 2], al
mov al, byte [ebp - 0x14]
mov byte [esi + 1], al
mov al, byte [ebp - 0x14]
mov byte [esi], al
inc dword [ebp - 0x24]
add esi, 3
dec edi
jne 0x58171e
jmp 0x581773
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581773
inc edi
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi + 2], al
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi + 1], al
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi], al
inc dword [ebp - 0x24]
add esi, 3
dec edi
jne 0x581753
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x5817a4
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x5817c8
jmp 0x5817bc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x5817c8
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x5816a4
cmp word [ebx + 0x22], 1
jne 0x5817d9
cmp dword [ebx + 0xc], 4
jne 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 1
ja 0x5819d4
cmp dword [ebx + 8], 2
jne 0x5819d4
cmp dword [ebx + 0xc], 8
jne 0x5819d4
mov al, byte [ebx + 0x180]
xor al, 1
mov byte [ebp - 0x45], al
cmp byte [ebp - 0x45], 0
je 0x581820
mov eax, dword [ebx + 0x17c]
mov byte [eax + 0x68], 0
cmp word [ebx + 0x22], 1
je 0x581834
mov eax, dword [ebp + 0x10]
add eax, eax
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x5819b6
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x58199f
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
cmp word [ebx + 0x1c], 0
jne 0x581904
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581961
inc edi
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov edx, 0xff
sub edx, eax
mov dword [ebp - 0x14], edx
mov al, byte [ebp - 0x14]
mov byte [esi + 2], al
mov al, byte [ebp - 0x14]
mov byte [esi + 1], al
mov al, byte [ebp - 0x14]
mov byte [esi], al
cmp byte [ebp - 0x45], 0
je 0x5818f5
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
push eax
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov eax, dword [ebx + 0x17c]
mov edx, dword [ebp - 0x10]
call fcn.006320d0
inc dword [ebp - 0x24]
jmp 0x5818f9
add dword [ebp - 0x24], 2
add esi, 3
inc dword [ebp - 0x10]
dec edi
jne 0x5818ab
jmp 0x581961
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581961
inc edi
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi + 2], al
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi + 1], al
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
mov byte [esi], al
cmp byte [ebp - 0x45], 0
je 0x581954
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
push eax
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov eax, dword [ebx + 0x17c]
mov edx, dword [ebp - 0x10]
call fcn.006320d0
inc dword [ebp - 0x24]
jmp 0x581958
add dword [ebp - 0x24], 2
add esi, 3
inc dword [ebp - 0x10]
dec edi
jne 0x581914
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x581992
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x5819b6
jmp 0x5819aa
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x5819b6
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x58184b
cmp word [ebx + 0x22], 1
jne 0x5819c7
cmp dword [ebx + 0xc], 4
jne 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 1
ja 0x581c53
cmp dword [ebx + 8], 1
jne 0x581c53
cmp dword [ebx + 0xc], 0x10
jne 0x581c53
cmp word [ebx + 0x22], 1
je 0x581a07
mov eax, dword [ebp + 0x10]
add eax, eax
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x581c3b
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x581c24
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x98]
push eax
mov eax, dword [ebx + 0xa4]
mov ecx, 0xf
mov edx, 1
call fcn.0040530c
mov eax, dword [ebp - 0x98]
mov edx, 0x58250c
call fcn.004051f8
jne 0x581a9a
mov dword [ebp - 0x18], 4
jmp 0x581aa1
mov dword [ebp - 0x18], 8
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 4
jne 0x581b3a
cmp word [ebx + 0x1c], 0
jne 0x581afb
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581be6
inc edi
mov dl, byte [ebx + 0x174]
xor dl, 1
mov eax, dword [ebp - 0x34]
mov ax, word [eax]
call fcn.00644e58
mov edx, dword [ebp - 0x34]
mov word [edx], ax
mov eax, dword [ebp - 0x34]
mov dx, 0xffff
sub dx, word [eax]
mov word [esi], dx
add dword [ebp - 0x34], 2
add esi, 2
dec edi
jne 0x581ac5
jmp 0x581be6
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581be6
inc edi
mov dl, byte [ebx + 0x174]
xor dl, 1
mov eax, dword [ebp - 0x34]
mov ax, word [eax]
call fcn.00644e58
mov edx, dword [ebp - 0x34]
mov word [edx], ax
mov eax, dword [ebp - 0x34]
mov ax, word [eax]
mov word [esi], ax
add dword [ebp - 0x34], 2
add esi, 2
dec edi
jne 0x581b08
jmp 0x581be6
cmp word [ebx + 0x1c], 0
jne 0x581b9a
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581be6
inc edi
mov dl, byte [ebx + 0x174]
xor dl, 1
mov eax, dword [ebp - 0x34]
mov ax, word [eax]
call fcn.00644e58
mov edx, dword [ebp - 0x34]
mov word [edx], ax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x34]
movzx eax, word [eax]
mov edx, 0xffff
sub edx, eax
shr edx, cl
mov dword [ebp - 0x14], edx
mov al, byte [ebp - 0x14]
mov byte [esi + 2], al
mov al, byte [ebp - 0x14]
mov byte [esi + 1], al
mov al, byte [ebp - 0x14]
mov byte [esi], al
add dword [ebp - 0x34], 2
add esi, 3
dec edi
jne 0x581b4e
jmp 0x581be6
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581be6
inc edi
mov dl, byte [ebx + 0x174]
xor dl, 1
mov eax, dword [ebp - 0x34]
mov ax, word [eax]
call fcn.00644e58
mov edx, dword [ebp - 0x34]
mov word [edx], ax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x34]
movzx eax, word [eax]
shr eax, cl
mov dword [ebp - 0x14], eax
mov al, byte [ebp - 0x14]
mov byte [esi + 2], al
mov al, byte [ebp - 0x14]
mov byte [esi + 1], al
mov al, byte [ebp - 0x14]
mov byte [esi], al
add dword [ebp - 0x34], 2
add esi, 3
dec edi
jne 0x581ba3
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x581c17
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x581c3b
jmp 0x581c2f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x581c3b
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581a1e
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 1
ja 0x581dca
cmp dword [ebx + 8], 1
jne 0x581dca
cmp dword [ebx + 0xc], 1
jne 0x581dca
mov eax, dword [ebp + 0x10]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x38]
call fcn.00402a9c
mov dword [ebp - 0x28], eax
mov cl, 0xff
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x28]
call fcn.0040889c
xor eax, eax
mov dword [ebp - 0x3c], eax
cmp word [ebx + 0x1c], 0
jne 0x581caf
cmp word [ebx + 0x22], 1
je 0x581cc4
cmp word [ebx + 0x22], 5
jae 0x581cc4
cmp word [ebx + 0x1c], 1
jne 0x581cca
cmp word [ebx + 0x22], 2
jbe 0x581cca
cmp word [ebx + 0x22], 4
jae 0x581cca
mov byte [ebp - 0x3d], 1
jmp 0x581cce
mov byte [ebp - 0x3d], 0
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x581db5
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x581d9e
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], esi
mov al, byte [ebp - 0x3d]
sub al, 1
jb 0x581d52
jne 0x581d60
mov edi, dword [ebp - 0x38]
dec edi
test edi, edi
jl 0x581d60
inc edi
mov eax, dword [ebp - 0x24]
mov al, byte [eax]
not al
mov edx, dword [ebp - 0x2c]
mov byte [edx], al
inc dword [ebp - 0x24]
inc dword [ebp - 0x2c]
dec edi
jne 0x581d3b
jmp 0x581d60
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
call fcn.00408894
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x581d91
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x581db5
jmp 0x581da9
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x581db5
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581ce5
mov eax, dword [ebp - 0x28]
call fcn.00402abc
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 5
jne 0x581f7b
cmp dword [ebx + 8], 4
jne 0x581f7b
cmp dword [ebx + 0xc], 8
jne 0x581f7b
cmp word [ebx + 0x22], 1
je 0x581dfe
mov eax, dword [ebp + 0x10]
shl eax, 2
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x581f63
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x581f4c
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 7
jne 0x581eb1
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x1c]
mov ecx, 3
cdq
idiv ecx
shl eax, 2
add dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581f0e
inc edi
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 1], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 2], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 3], dl
inc eax
add dword [ebp - 0x5c], 4
dec edi
jne 0x581e7d
jmp 0x581f0e
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x581ef0
inc edi
mov dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
inc eax
dec edi
jne 0x581ed1
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
mov dl, 2
mov eax, dword [ebp - 0x20]
call edi
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x581f3f
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x581f63
jmp 0x581f57
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x581f63
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581e15
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 5
jne 0x58217c
cmp dword [ebx + 8], 5
jl 0x58217c
cmp dword [ebx + 0xc], 8
jne 0x58217c
cmp word [ebx + 0x22], 1
je 0x581faf
mov eax, dword [ebx + 8]
imul dword [ebp + 0x10]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x582164
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x58214d
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 7
jne 0x582081
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x1c]
mov ecx, 3
cdq
idiv ecx
shl eax, 2
add dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x58210f
inc edi
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 1], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 2], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 3], dl
inc eax
mov edx, dword [ebx + 8]
sub edx, 4
test edx, edx
jle 0x582075
mov dword [ebp - 0x18], 1
inc eax
inc dword [ebp - 0x18]
dec edx
jne 0x58206e
add dword [ebp - 0x5c], 4
dec edi
jne 0x582032
jmp 0x58210f
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x5c], edx
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x5820f1
inc edi
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 1], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 2], dl
inc eax
mov dl, 0xff
sub dl, byte [eax]
mov ecx, dword [ebp - 0x5c]
mov byte [ecx + 3], dl
inc eax
mov edx, dword [ebx + 8]
sub edx, 4
test edx, edx
jle 0x5820ea
mov dword [ebp - 0x18], 1
inc eax
inc dword [ebp - 0x18]
dec edx
jne 0x5820e3
add dword [ebp - 0x5c], 4
dec edi
jne 0x5820a7
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
mov dl, 2
mov eax, dword [ebp - 0x20]
call edi
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x582140
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x582164
jmp 0x582158
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x582164
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x581fc6
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 5
jne 0x5823b9
cmp dword [ebx + 8], 4
jne 0x5823b9
cmp dword [ebx + 0xc], 0x10
jne 0x5823b9
cmp word [ebx + 0x22], 1
je 0x5821b0
mov eax, dword [ebp + 0x10]
shl eax, 3
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x5823a1
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x58238a
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x10]
cmp al, 7
jne 0x58229f
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
jns 0x58221c
add eax, 3
sar eax, 2
shl eax, 2
add dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x58234c
inc edi
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
shr eax, 8
mov dl, 0xff
sub dl, al
mov eax, dword [ebp - 0x5c]
mov byte [eax], dl
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
shr eax, 8
mov dl, 0xff
sub dl, al
mov eax, dword [ebp - 0x5c]
mov byte [eax + 1], dl
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
shr eax, 8
mov dl, 0xff
sub dl, al
mov eax, dword [ebp - 0x5c]
mov byte [eax + 2], dl
add dword [ebp - 0x1c], 2
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax]
shr eax, 8
mov dl, 0xff
sub dl, al
mov eax, dword [ebp - 0x5c]
mov byte [eax + 3], dl
add dword [ebp - 0x1c], 2
add dword [ebp - 0x5c], 4
dec edi
jne 0x582238
jmp 0x58234c
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
shl eax, 2
call fcn.00402a9c
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp + 0x10]
dec edi
test edi, edi
jl 0x582326
inc edi
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx]
shr edx, 8
mov cl, 0xff
sub cl, dl
mov byte [eax], cl
inc eax
add dword [ebp - 0x1c], 2
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx]
shr edx, 8
mov cl, 0xff
sub cl, dl
mov byte [eax], cl
inc eax
add dword [ebp - 0x1c], 2
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx]
shr edx, 8
mov cl, 0xff
sub cl, dl
mov byte [eax], cl
inc eax
add dword [ebp - 0x1c], 2
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx]
shr edx, 8
mov cl, 0xff
sub cl, dl
mov byte [eax], cl
inc eax
add dword [ebp - 0x1c], 2
dec edi
jne 0x5822d3
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
mov dl, 2
mov eax, dword [ebp - 0x30]
call edi
mov eax, dword [ebp - 0x30]
call fcn.00402abc
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x58237d
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x5823a1
jmp 0x582395
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x5823a1
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x5821c7
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
jmp 0x5824c1
cmp word [ebx + 0x1c], 8
jne 0x5824c1
cmp dword [ebx + 8], 3
jne 0x5824c1
cmp dword [ebx + 0xc], 8
jne 0x5824c1
cmp word [ebx + 0x22], 1
je 0x5823ed
mov eax, dword [ebp + 0x10]
lea eax, [eax + eax*2]
call fcn.00402a9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
dec eax
test eax, eax
jl 0x5824b2
inc eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xc], 0
push ebx
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp + 0x18]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
call fcn.0057ff84
test al, al
je 0x58249b
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
mov esi, eax
mov eax, dword [ebp + 0x1c]
add esi, eax
push 1
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebx + 0x178]
push eax
mov edi, dword [0x7157b8]
mov edi, dword [edi]
mov ecx, esi
mov dl, 4
mov eax, dword [ebp - 0x20]
call edi
mov eax, dword [ebp + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0
je 0x58248e
mov eax, dword [ebp + 8]
fild dword [eax + 0xc]
mov eax, dword [ebp + 8]
fmul qword [eax + 0x18]
call fcn.0040308c
mov ecx, eax
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov eax, dword [esi + 4]
call dword [esi]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
cmp byte [eax], 0
jne 0x5824b2
jmp 0x5824a6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x28]
mov byte [eax], 1
jmp 0x5824b2
inc dword [ebp - 0xc]
dec dword [ebp - 0x60]
jne 0x582404
cmp word [ebx + 0x22], 1
je 0x5824c1
mov eax, dword [ebp - 0x20]
call fcn.00402abc
cmp word [ebx + 0x22], 5
jne 0x5824d5
lea ecx, [ebp - 0x44]
xor edx, edx
xor eax, eax
call dword [ebx + 0x170]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5824f5
lea eax, [ebp - 0x98]
call fcn.00404dd0
ret